diff --git a/docs/rules/no-sequences.md b/docs/rules/no-sequences.md index af4a7a0edcf..d4efc1c5ba5 100644 --- a/docs/rules/no-sequences.md +++ b/docs/rules/no-sequences.md @@ -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: