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: no-mixed-operators - allowSamePrecedence option docs improvement #9962
Docs: no-mixed-operators - allowSamePrecedence option docs improvement #9962
Comments
no-mixed-operators rule - allowSamePrecedence option is incorrectly documented.
I'm not sure I understand. The purpose of the rule is to require parentheses around an expression with two or more consecutive binary operators in it. The So if The example Am I missing something? |
Ah I see I've slightly misread the docs. I think I was confused due to there being no 'correct' example for Thanks for clearing things up. |
@munkychop I think the natural/correct example in that case would be |
@platinumazure sure, I can do that. Maybe it would help clarify things for others :) |
I've created the PR. Let me know if there's anything more to add to that :) |
Tell us about your environment
N/A (macOS Sierra 10.12.6)
ESLint Version:
v4.17.0
Node Version:
N/A (v8.9.1)
npm Version:
N/A (v5.5.1)
What parser (default, Babel-ESLint, etc.) are you using?
N/A (default)
Please show your full configuration:
N/A
What did you expect to happen?
The
allowSamePrecedence
option of theno-mixed-operators
rule should correctly document "Examples of incorrect code for this rule with{"allowSamePrecedence": false}
option".What actually happened? Please include the actual, raw output from ESLint.
The documentation is incorrect, as it is the same as "Examples of correct code for this rule with {"allowSamePrecedence": true} option":
This should simply be changed to something like this:
The text was updated successfully, but these errors were encountered: