warning
no-useless-returnReports the use of redundant return statements
Examples
❌ Incorrect
function foo() { return; }
function foo() {
doSomething();
return;
}
✅ Correct
function foo() { return 5; }
function bar() {
return doSomething();
}