Skip to content

Commit 74fa253

Browse files
munkychopnot-an-aardvark
authored andcommittedFeb 10, 2018
Docs: Clarify no-mixed-operators options (fixes #9962) (#9964)
1 parent 426868f commit 74fa253

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed
 

‎docs/rules/no-mixed-operators.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,19 @@ Examples of **incorrect** code for this rule with `{"allowSamePrecedence": false
138138
var foo = a + b - c;
139139
```
140140

141+
Examples of **correct** code for this rule with `{"allowSamePrecedence": false}` option:
142+
143+
```js
144+
/*eslint no-mixed-operators: ["error", {"allowSamePrecedence": false}]*/
145+
146+
// + and - have the same precedence.
147+
var foo = (a + b) - c;
148+
```
149+
141150
## When Not To Use It
142151

143152
If you don't want to be notified about mixed operators, then it's safe to disable this rule.
144153

145154
## Related Rules
146155

147-
* [no-extra-parens](no-extra-parens.md)
156+
* [no-extra-parens](no-extra-parens.md)

0 commit comments

Comments
 (0)
Please sign in to comment.