[fixes: #1678] Improves wording of no-mixed-operators recommendation.

This commit is contained in:
Sharmila
2018-01-08 14:36:08 -08:00
parent ea8fd76c5e
commit fe3a2de6b5

View File

@@ -1945,7 +1945,7 @@ Other Style Guides
```
<a name="comparison--no-mixed-operators"></a>
- [15.8](#comparison--no-mixed-operators) Enclose operators in parentheses when they are mixed in a statement. When mixing arithmetic operators, do not mix `**` and `%` with themselves or with `+`, `-`, `*`, & `/`. eslint: [`no-mixed-operators`](https://eslint.org/docs/rules/no-mixed-operators.html)
- [15.8](#comparison--no-mixed-operators) When mixing operators, enclose them in parentheses. The only exception is the standard arithmetic operators (`+`, `-`, `*`, & `/`) since their precedence is broadly understood. eslint: [`no-mixed-operators`](https://eslint.org/docs/rules/no-mixed-operators.html)
> Why? This improves readability and clarifies the developers intention.