-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Closed
Copy link
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussiondocumentationRelates to ESLint's documentationRelates to ESLint's documentationruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
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 the no-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":
/*eslint no-mixed-operators: ["error", {"allowSamePrecedence": true}]*/
// + and - have the same precedence.
var foo = a + b - c;/*eslint no-mixed-operators: ["error", {"allowSamePrecedence": false}]*/
// + and - have the same precedence.
var foo = a + b - c;This should simply be changed to something like this:
/*eslint no-mixed-operators: ["error", {"allowSamePrecedence": false}]*/
// + and * have different precedence.
var foo = a + b * c;Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussiondocumentationRelates to ESLint's documentationRelates to ESLint's documentationruleRelates to ESLint's core rulesRelates to ESLint's core rules