no-unreachable
Configuration
rslint.config.ts
Rule Details
Disallows unreachable code after return, throw, break, and continue statements. Because these statements unconditionally exit a block of code, any statements after them cannot be executed and are therefore unreachable.
Function declarations are allowed after terminal statements because they are hoisted. Similarly, var declarations without initializers are allowed because the declaration itself is hoisted, even though the assignment would be unreachable.
Examples of incorrect code for this rule:
Examples of correct code for this rule: