ESLint rules that enforce best practices for JavaScript promises
open sourceISCfree
eslint-plugin-promise is an ESLint plugin with rules for JavaScript promises: always returning or catching, not nesting promises, not mixing callbacks and promises, valid parameter names, no return in finally, and not resolving a promise more than once, among others. It ships a recommended rule set for flat and legacy configs, and is ISC licensed and maintained by the ESLint Community organization.
Problems it solves
- catch unhandled or unreturned promises in my JavaScript with a linter
- stop developers nesting promise chains in a Node.js codebase
- lint for callbacks mixed with promises
Features
- Rules for returning, catching and nesting promises
- Rules against mixing callbacks and promises
- Recommended rule set for flat and legacy configs
Alternatives
The same job
These do what eslint-plugin-promise does.
- typescript-eslint The tooling that lets ESLint and Prettier lint and read TypeScript
- ESLint Find and fix problems in your JavaScript code.
