Possible Errors

Best Practices

Strict Mode

Variables

Node.js and CommonJS

Stylistic Issues

ECMAScript 6

prefer-promise-reject-errors

- Require using Error objects as Promise rejection reasons

This rule aims to ensure that Promises are only rejected with Error objects.

What ESLint should do when it catches the rule break

Show a warning

Options

allowEmptyReject

Allows calls to Promise.reject() with no arguments.

Rule examples

You can check them out here.