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
Docs: clarify no-mixed-operators (fixes #8051) #9404
Conversation
LGTM |
c4cf466
to
33180f6
Compare
LGTM |
docs/rules/no-mixed-operators.md
Outdated
@@ -9,6 +9,21 @@ var foo = (a && b) || c || d; /*GOOD*/ | |||
var foo = a && (b || c || d); /*GOOD*/ | |||
``` | |||
|
|||
**Note:** | |||
It is expected for this rule to emit one error for each mixed operator in a pair. As a result, for each two consecutive mixed operators used, a distinct error will be displayed, pointing to the where the specific operator that breaks the rule is used: |
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.
Nits: pointing to the where...
"the" should be removed?
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.
Oops! Thanks @aladdin-add, I removed it.
Update docs for `no-mixed-operators` to clarify that a pair of errors will be triggered for each pair of mixed consecutive operators used. Fixes eslint#8051.
33180f6
to
3217eea
Compare
LGTM |
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.
LGTM. thanks!
LGTM. Thanks for contributing to ESLint! |
no-mixed-operators
rule
Update docs for
no-mixed-operators
to clarify that a pair of errors will be triggered for each pair of mixed consecutive operators used. Fixes #8051.What is the purpose of this pull request? (put an "X" next to item)
[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Just an update to the documentation for the
no-mixed-operators
rule.Is there anything you'd like reviewers to focus on?