no-sequences
Configuration
rslint.config.ts
Rule Details
This rule forbids the use of the comma operator, with the following exceptions:
- In the initialization or update portions of a
forstatement. - By default, if the expression sequence is explicitly wrapped in parentheses. This exception can be removed with the
"allowInParentheses": falseoption.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
This rule takes one optional object argument:
allowInParentheses— when set tofalse, disallows expression sequences even when explicitly wrapped in parentheses. Defaulttrue.
Examples of incorrect code for this rule with { "allowInParentheses": false }: