Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: remove confusing examples for no-mixed-operators #15875

Merged
merged 1 commit into from May 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions docs/src/rules/no-mixed-operators.md
Expand Up @@ -12,8 +12,6 @@ This rule warns when different operators are used consecutively without parenthe

```js
var foo = a && b || c || d; /*BAD: Unexpected mix of '&&' and '||'.*/
var foo = a && b ? c : d; /*BAD: Unexpected mix of '&&' and '?:'.*/
var foo = (a && b) ? c : d; /*GOOD*/
var foo = (a && b) || c || d; /*GOOD*/
var foo = a && (b || c || d); /*GOOD*/
```
Expand All @@ -32,17 +30,6 @@ will generate
1:18 Unexpected mix of '&&' and '||'. (no-mixed-operators)
```

```js
var foo = a && b ? c : d;
```

will generate

```shell
1:13 Unexpected mix of '&&' and '?:'. (no-mixed-operators)
1:18 Unexpected mix of '&&' and '?:'. (no-mixed-operators)
```

## Rule Details

This rule checks `BinaryExpression`, `LogicalExpression` and `ConditionalExpression`.
Expand Down