no-negated-condition
Added in v0.8.1Configuration
rslint.config.ts
Rule Details
Negated conditions are more difficult to understand. Code can be made more readable by inverting the condition instead.
This rule disallows negated conditions in either of the following:
ifstatements which have anelsebranch- ternary expressions
Examples of incorrect code for this rule:
Examples of correct code for this rule: