Skip to content
Permalink
Browse files
Docs: add more examples with arrow functions for no-sequences rule (#…
…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 eb299966bdc3920dd2c6f9774d95103d242fc409
Showing 1 changed file with 6 additions and 0 deletions.
@@ -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:
@@ -61,6 +63,8 @@ switch ((val = foo(), val)) {}
while ((val = foo(), val < 42));
with ((doSomething(), val)) {}
const foo = (val) => ((console.log('bar'), val));
```

## Options
@@ -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:

0 comments on commit eb29996

Please sign in to comment.