Use ESLint selectors in custom rules#17572
Merged
cjihrig merged 4 commits intonodejs:masterfrom Dec 12, 2017
Merged
Conversation
apapirovski
approved these changes
Dec 9, 2017
Contributor
apapirovski
left a comment
There was a problem hiding this comment.
Great stuff! Just a couple of nits for legibility but not critical :)
Contributor
There was a problem hiding this comment.
For the sake of legibility, we could extract this outside of module.exports and just use [astSelector]? Your call but I'm not a fan of the run-on line (having the [] beneath each other is a bit more legible IMHO).
Contributor
There was a problem hiding this comment.
This could be extracted into a function outside of module.exports that takes input for the argument position, so something like getAstSelector(pos). Then we also don't need to have the run on line.
Contributor
Author
|
Pulled selectors out into variables, as requested. |
apapirovski
approved these changes
Dec 11, 2017
PR-URL: nodejs#17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
PR-URL: nodejs#17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
PR-URL: nodejs#17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
PR-URL: nodejs#17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 12, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Merged
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Member
|
Didn't cherry-pick the last commit back to 6.x as it conflicted. |
Closed
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Merged
Merged
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn
pushed a commit
that referenced
this pull request
Dec 20, 2017
PR-URL: #17572 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR simplifies several of our custom ESLint rules by using selector syntax instead of handwritten functions to identify matching AST nodes.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
tools