Skip to content

Commit

Permalink
Docs: no-mixed-operators - resolves #9962
Browse files Browse the repository at this point in the history
  • Loading branch information
munkychop committed Feb 9, 2018
1 parent bf3d494 commit dfd1e84
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/rules/no-mixed-operators.md
Expand Up @@ -138,10 +138,19 @@ Examples of **incorrect** code for this rule with `{"allowSamePrecedence": false
var foo = a + b - c;
```

Examples of **correct** code for this rule with `{"allowSamePrecedence": false}` option:

```js
/*eslint no-mixed-operators: ["error", {"allowSamePrecedence": false}]*/

// + and - have the same precedence.
var foo = (a + b) - c;
```

## When Not To Use It

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

## Related Rules

* [no-extra-parens](no-extra-parens.md)
* [no-extra-parens](no-extra-parens.md)

0 comments on commit dfd1e84

Please sign in to comment.