When an if block always ends with a terminating statement (return or throw), any code in the else block is unnecessary because it will only execute when the condition is false.
Removing the else clause reduces nesting and improves code readability.
This rule also handles:
throw statements as terminating statements
Nested if/else blocks where the inner if-else always terminates (making the outer else unnecessary)
If your team prefers the explicit structure of if/else blocks for clarity in conditional logic, or you have a large codebase where enforcing this style would require significant refactoring, you may choose to disable this rule.