no-lonely-if
UnreleasedConfiguration
rslint.config.ts
Rule Details
If an if statement is the only statement in the else block, it is often clearer to use an else if form.
should be rewritten as
This rule disallows if statements as the only statement in else blocks.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
When Not To Use It
Disable this rule if the code is clearer without requiring the else if form.