Skip to content

Commit

Permalink
docs: remove confusing examples for no-mixed-operators (#15875)
Browse files Browse the repository at this point in the history
Refs #15870
  • Loading branch information
mdjermanovic authored May 13, 2022
1 parent 3071d76 commit 1d39f69
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions docs/src/rules/no-mixed-operators.md
Original file line number Diff line number Diff line change
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

0 comments on commit 1d39f69

Please sign in to comment.