Navigation Menu

Skip to content

Commit

Permalink
Docs: add more examples with arrow functions for no-sequences rule (#…
Browse files Browse the repository at this point in the history
…14313)

* Docs: add more examples with arrow functions for no-sequences rule

* Docs: update
  • Loading branch information
snitin315 committed Apr 12, 2021
1 parent 555cbf3 commit eb29996
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/rules/no-sequences.md
Expand Up @@ -39,6 +39,8 @@ switch (val = foo(), val) {}
while (val = foo(), val < 42);

with (doSomething(), val) {}

const foo = (val) => (console.log('bar'), val);
```

Examples of **correct** code for this rule:
Expand All @@ -61,6 +63,8 @@ switch ((val = foo(), val)) {}
while ((val = foo(), val < 42));

with ((doSomething(), val)) {}

const foo = (val) => ((console.log('bar'), val));
```

## Options
Expand Down Expand Up @@ -91,6 +95,8 @@ switch ((val = foo(), val)) {}
while ((val = foo(), val < 42));

with ((doSomething(), val)) {}

const foo = (val) => ((console.log('bar'), val));
```

Examples of **correct** code for this rule with the `{ "allowInParentheses": false }` option:
Expand Down

0 comments on commit eb29996

Please sign in to comment.