no-plusplus
Added in v0.8.1Configuration
rslint.config.ts
Rule Details
Because the unary ++ and -- operators are subject to automatic semicolon insertion, differences in whitespace can change the semantics of source code.
This rule disallows the unary operators ++ and --.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
This rule has an object option.
"allowForLoopAfterthoughts": trueallows unary operators++and--in the afterthought (final expression) of aforloop.
allowForLoopAfterthoughts
Examples of correct code for this rule with the { "allowForLoopAfterthoughts": true } option:
Examples of incorrect code for this rule with the { "allowForLoopAfterthoughts": true } option: