-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
tools: alphabetize ESLint rules #19100
Conversation
260c79f
to
6329881
Compare
cc @nodejs/linting |
'dot-location': ['error', 'property'], | ||
'dot-notation': 'error', | ||
'eol-last': 'error', | ||
eqeqeq: ['error', 'smart'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason some of these are '
quoted and others not? If not, can we pick one style and be consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely prefer it be consistent and intend to introduce a lint rule requiring that (if someone doesn't beat me to it). Was going to wait for this to land first to keep the pull requests minimal and focused. By waiting for this to land first, we avoid a merge conflict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing they're quoted as needed for object properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't like that and would prefer that they all be quoted for consistency if one needs to be quoted. But that's just a preference. My plan is to try to figure out what the most common practice is in the code base, and then enforce that. If it's what's going on here, then so be it.
Editing error? (PR description and commit message). |
Yup. Fixing right now. Thanks. |
I have never found it useful that the ESLint rules (in the configuration file) are organized by the categorization the rules are given in the ESLint documentation. It has only been a source of annoyance as one has to look up where the rule is in the docs to figure out where it should go in the configuration file. This change re-orders the rules so they are in alphabetical order. Simple!
6329881
to
cbca4e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has only been a source of
annoyance as one has to look up where the rule is in the docs to figure
out where it should go in the configuration file.
Agreed!
'dot-location': ['error', 'property'], | ||
'dot-notation': 'error', | ||
'eol-last': 'error', | ||
eqeqeq: ['error', 'smart'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing they're quoted as needed for object properties.
(CI failures appear build-related and not related to this change...I mean, that's probably obvious. If the linter passed, I think we're good here.) |
Landed in c221355 |
I have never found it useful that the ESLint rules (in the configuration file) are organized by the categorization the rules are given in the ESLint documentation. It has only been a source of annoyance as one has to look up where the rule is in the docs to figure out where it should go in the configuration file. This change re-orders the rules so they are in alphabetical order. Simple! PR-URL: #19100 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Shingo Inoue <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Should this be backported to |
Refs: nodejs#19100 (comment) PR-URL: nodejs#19156 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
I have never found it useful that the ESLint rules (in the configuration file) are organized by the categorization the rules are given in the ESLint documentation. It has only been a source of annoyance as one has to look up where the rule is in the docs to figure out where it should go in the configuration file. This change re-orders the rules so they are in alphabetical order. Simple! PR-URL: nodejs#19100 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Shingo Inoue <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Refs: nodejs#19100 (comment) PR-URL: nodejs#19156 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
I have never found it useful that the ESLint rules (in the
configuration file) are organized by the categorization the rules are
given in the ESLint documentation. It has only been a source of
annoyance as one has to look up where the rule is in the docs to figure
out where it should go in the configuration file.
This change re-orders the rules so they are in alphabetical order.
Simple!
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
tools