Skip to content

Commit eb29996

Browse files
authored
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
1 parent 555cbf3 commit eb29996

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/rules/no-sequences.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ switch (val = foo(), val) {}
3939
while (val = foo(), val < 42);
4040

4141
with (doSomething(), val) {}
42+
43+
const foo = (val) => (console.log('bar'), val);
4244
```
4345

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

6365
with ((doSomething(), val)) {}
66+
67+
const foo = (val) => ((console.log('bar'), val));
6468
```
6569

6670
## Options
@@ -91,6 +95,8 @@ switch ((val = foo(), val)) {}
9195
while ((val = foo(), val < 42));
9296

9397
with ((doSomething(), val)) {}
98+
99+
const foo = (val) => ((console.log('bar'), val));
94100
```
95101

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

0 commit comments

Comments
 (0)