mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 06:18:00 -05:00
[fixes: #1678] Improves wording of no-mixed-operators recommendation.
This commit is contained in:
@@ -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 developer’s intention.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user