The less code, the fewer bugs. β Kevlin Henney
Enforce the unary operators ++ and -- (no-no-plusplus) β
πΌ This rule is enabled in the following configs: π all, β
recommended.
π§ This rule is automatically fixable by the --fix CLI option.
π Rule details β
Use ++ instead of += 1, and -- instead of -= 1.
The initial plan was to replace += 4 by ++++++++, and so on. But it turns out consecutive ++ don't work π
π See also β
π§ Config β
js
{ rules: { 'ninja/no-no-plusplus': 2 } }