-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Support private properties for semi rule #11748
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c10e795:
|
} | ||
} | ||
} | ||
|
||
export default ruleComposer.joinReports([ | ||
rule, | ||
context => ({ | ||
ClassProperty(node) { |
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.
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.
Yes! As an example, you can see this core rule: https://github.com/eslint/eslint/blob/master/lib/rules/func-call-spacing.js#L171
We should be able to combine both of these selectors into one, e.g. "ClassProperty, ClassPrivateProperty"(node) {}
.
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.
Good to know that A, B
is supported, guess we should update https://eslint.org/docs/developer-guide/selectors#what-syntax-can-selectors-have.
Update: estools/esquery#113
} | ||
} | ||
} | ||
|
||
export default ruleComposer.joinReports([ | ||
rule, | ||
context => ({ | ||
ClassProperty(node) { |
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.
Yes! As an example, you can see this core rule: https://github.com/eslint/eslint/blob/master/lib/rules/func-call-spacing.js#L171
We should be able to combine both of these selectors into one, e.g. "ClassProperty, ClassPrivateProperty"(node) {}
.
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.
@kaicataldo 's concern has been addressed.
Corresponding PR for eslint-plugin-babel repo: babel/eslint-plugin-babel#194 (comment)