Possible Errors

Best Practices

Strict Mode

Variables

Node.js and CommonJS

Stylistic Issues

ECMAScript 6

consistent-return

- Require return statements to either always or never specify values

This rule requires return statements to either always or never specify values. This rule ignores function definitions where the name begins with an uppercase letter, because constructors (when invoked with the new operator) return the instantiated object implicitly if they do not return another object explicitly.

What ESLint should do when it catches the rule break

Show a warning

Options

treatUndefinedAsUnspecified

Allows either specify values or return undefined explicitly or implicitly.

Rule examples

You can check them out here.