consistent-return
Configuration
rslint.config.ts
Rule Details
Require return statements to either always or never specify values. This is the TypeScript-enhanced version of the ESLint consistent-return rule. It uses type information to allow valid return patterns for functions with void, undefined, or Promise<void> return types.
A function with inconsistent return statements (some returning a value and some not) is typically a mistake.
Examples of incorrect code for this rule:
Examples of correct code for this rule: