Possible Errors

Best Practices

Strict Mode

Variables

Node.js and CommonJS

Stylistic Issues

ECMAScript 6

no-throw-literal

- Disallow throwing literals as exceptions

This rule is aimed at maintaining consistency when throwing exception by disallowing to throw literals and other expressions which cannot possibly be an Error object.

What ESLint should do when it catches the rule break

Show a warning

Rule examples

You can check them out here.