Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. ESLint
  3. Promise

Promise

ISCJavaScriptv7.3.0

An ESLint plugin that enforces best practices and consistent patterns for JavaScript promises.

GitHubGitHub
1.0k stars101 forks0 contributors

What is Promise?

eslint-plugin-promise is an ESLint plugin that provides linting rules to enforce best practices and consistent patterns when working with JavaScript promises. It helps developers avoid common pitfalls in asynchronous code, such as missing error handling, unnecessary promise wrapping, and nested promise chains. The plugin includes both recommended and configurable rules to improve code reliability and maintainability.

Target Audience

JavaScript developers working with promise-based asynchronous code, particularly those using ESLint for code quality enforcement in Node.js or browser environments.

Value Proposition

Developers choose eslint-plugin-promise because it offers a focused, comprehensive set of rules specifically for promises, catching subtle bugs that generic linting might miss. Its recommended configuration provides sensible defaults, while its flexibility allows teams to customize rules to fit their coding standards.

Overview

Enforce best practices for JavaScript promises

Use Cases

Best For

  • Enforcing consistent error handling patterns in promise chains
  • Preventing common promise anti-patterns like nested then() calls
  • Ensuring readable and maintainable asynchronous code in large codebases
  • Catching subtle bugs such as multiple promise resolutions
  • Teams adopting ESLint to standardize promise usage across projects
  • Migrating callback-based code to promise-based patterns

Not Ideal For

  • Projects not using ESLint or integrated with alternative linting tools like JSHint
  • Codebases that exclusively use async/await with minimal explicit promise chains, where rules targeting then()/catch() may add noise
  • Teams with established, divergent promise patterns that conflict with opinionated rules like 'avoid-new' or 'param-names'
  • Environments relying on non-standard promise libraries or polyfills that don't align with ES6 Promise assumptions

Pros & Cons

Pros

Comprehensive Rule Coverage

The plugin offers over 15 specific rules targeting promise anti-patterns, from error handling ('catch-or-return') to constructor usage ('no-new-statics'), as detailed in the rules table.

Sensible Default Configuration

Includes a 'recommended' rule set that enforces critical practices like 'always-return' and 'catch-or-return', making it easy to adopt best practices without extensive setup.

Auto-fix for Common Issues

Rules like 'no-new-statics' and 'prefer-catch' are marked as fixable with ESLint's --fix option, allowing automatic correction of code without manual refactoring.

Active Maintenance and Community

The README shows continuous integration badges and lists multiple maintainers, indicating ongoing support, updates, and reliability for production use.

Cons

ESLint Dependency Overhead

Requires ESLint to be installed and configured, adding complexity for projects not already using it or those with minimal linting needs, as noted in the installation steps.

Opinionated Rule Enforcement

Rules like 'avoid-new' discourage using new Promise() in favor of util.promisify, which may not fit all coding styles or legacy codebases, potentially causing friction.

Limited to Promise Patterns

Focuses solely on promises, missing linting for other async patterns like async/await nuances beyond basic rules, though some rules like 'prefer-await-to-then' are included.

Frequently Asked Questions

Quick Stats

Stars1,000
Forks101
Contributors0
Open Issues29
Last commit4 days ago
CreatedSince 2016

Tags

#async-await#promises#code-quality#best-practices#error-handling#eslint-plugin#javascript#eslint#linting

Built With

J
JavaScript
E
ESLint

Included in

ESLint4.7k
Auto-fetched 1 day ago

Related Projects

importimport

ESLint plugin with rules that help validate proper imports.

Stars5,923
Forks1,545
Last commit8 days ago
functionalfunctional

ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.

Stars987
Forks35
Last commit4 days ago
fpfp

ESLint rules for functional programming

Stars967
Forks35
Last commit5 years ago
boundariesboundaries

Eslint plugin checking architecture boundaries between elements

Stars911
Forks19
Last commit3 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub