no-useless-return
UnreleasedConfiguration
rslint.config.ts
Rule Details
A return; at the end of a function does the same thing as reaching the end of
the function, so it can be dropped. This rule reports every return with no
value that nothing runs after.
A return that carries a value is left alone, and so is one inside a loop —
which leaves the loop early — or inside a finally block, which replaces the
value the statement was leaving with.
Examples of incorrect code for this rule:
Examples of correct code for this rule: