2 title: no-useless-return
9 A `return;` statement with nothing after it is redundant, and has no effect on the runtime behavior of a function. This can be confusing, so it's better to disallow these redundant statements.
13 This rule aims to report redundant `return` statements.
15 Examples of **incorrect** code for this rule:
20 /* eslint no-useless-return: "error" */
22 function foo() { return; }
52 Examples of **correct** code for this rule:
57 /* eslint no-useless-return: "error" */
59 function foo() { return 5; }
86 for (const foo of bar) {
97 If you don't care about disallowing redundant return statements, you can turn off this rule.