diff --git a/docs/rules/no-sequences.md b/docs/rules/no-sequences.md index 1d05e82554d..f1f4afea0ac 100644 --- a/docs/rules/no-sequences.md +++ b/docs/rules/no-sequences.md @@ -66,3 +66,12 @@ while ((val = foo(), val < 42)); ## When Not To Use It Disable this rule if sequence expressions with the comma operator are acceptable. +Another case is where you might want to report all usages of the comma operator, even if they are wrapped in parentheses or in a for loop. You can achieve this using rule `no-restricted-syntax`: + +```js +{ + "rules": { + "no-restricted-syntax": ["error", "SequenceExpression"] + } +} +```