-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch hint
s to use double quotes everywhere
#5261
Conversation
Also, have `Battle#hint` take Side per @urkerab's suggestion. Followup to smogon#5258, no functionality changes.
Co-Authored-By: scheibo <[email protected]>
The rule I have in mind is: foo(bar, baz);
// good
foo(bar,
baz);
// good
foo(
bar,
baz
);
// good
foo(bar,
baz
);
// bad
foo(
bar,
baz);
// bad |
I agree, that seems like a good style. TBH though, I think we should be using an automatic formatter (prettier, clang-format, etc, take your pick) and if we can't configure it with the style we want completely (the string quoting rules spring to mind) we should just accept it because not having to GAF about formatting issues and having an automatically uniform codebase far outweighs trying to manually achieve 'perfection' but having it poorly done (humans are fallible). I go into more details about that in the doc I'm writing reviewing PS with suggestions, but because its came up twice recently I figured I might as well float the idea your way earlier. |
Small consistency nit with no functional different, but volatiles are IDs and all the rest are lowercase.
Hm. I've always thought prettier output was uglier than the manual stuff we've been doing. I don't really mind everything being somewhat inconsistent, in exchange for being able to convey information with code structure. |
I think the current tradeoff is good enough; we leave some formatting decisions in the hands of coders (and accept that they might be wrong sometimes), in exchange for having some flexibility in how you want the code to look. |
Co-Authored-By: scheibo <[email protected]>
I haven't used prettier, I'm using a I really like the style of the new PS (and Preact PS client) code. I think before suggesting a move to an automatic formatter more formally I'll need to try setting one up and seeing concretely what changes it would make. I don't know about prettier, but I think |
Also, have
Battle#hint
take Side per @urkerab's suggestion.Followup to #5258, no functionality changes.