From eb299966bdc3920dd2c6f9774d95103d242fc409 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 12 Apr 2021 21:23:33 +0530 Subject: [PATCH] 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 --- docs/rules/no-sequences.md | 6 ++++++ 1 file changed, 6 insertions(+) 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: