We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
eslint
Learn more about funding links in repositories.
Report abuse
1 parent 426868f commit 74fa253Copy full SHA for 74fa253
docs/rules/no-mixed-operators.md
@@ -138,10 +138,19 @@ Examples of **incorrect** code for this rule with `{"allowSamePrecedence": false
138
var foo = a + b - c;
139
```
140
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
150
## When Not To Use It
151
152
If you don't want to be notified about mixed operators, then it's safe to disable this rule.
153
154
## Related Rules
155
-* [no-extra-parens](no-extra-parens.md)
156
+* [no-extra-parens](no-extra-parens.md)
0 commit comments