{"name":"eslint-plugin-promise","version":"7.2.1","description":"Enforce best practices for JavaScript promises","keywords":["eslint","eslintplugin","eslint-plugin","promise","promises"],"homepage":"https://github.com/eslint-community/eslint-plugin-promise","bugs":{"url":"https://github.com/eslint-community/eslint-plugin-promise/issues"},"repository":{"type":"git","url":"git+https://github.com/eslint-community/eslint-plugin-promise.git"},"license":"ISC","author":{"name":"jden","email":"jason@denizac.org"},"contributors":[{"name":"Brett Zamir"},{"name":"Aadit M Shah","email":"aaditmshah@aadit.codes","url":"https://aadit.codes/"}],"scripts":{"format":"prettier --write . && eslint . --fix","lint":"npm-run-all \"lint:*\"","lint:eslint-docs":"npm run update:eslint-docs && git diff --exit-code","lint:js":"eslint --report-unused-disable-directives .","prepare":"husky","test":"jest --coverage","update:eslint-docs":"eslint-doc-generator && npm run format"},"lint-staged":{"{README.md,CONTRIBUTING.md}":["doctoc --maxlevel 3 --notitle"],"*.js":["prettier --write","eslint --report-unused-disable-directives --fix"],"*.+(json|md)":["prettier --write"]},"prettier":{"proseWrap":"always","semi":false,"singleQuote":true},"jest":{"coverageThreshold":{"global":{"branches":100,"functions":100,"lines":100,"statements":100}},"collectCoverageFrom":["rules/*.js","rules/*/*.js","!rules/lib/eslint-compat.js"],"testPathIgnorePatterns":["__tests__/rule-tester.js"]},"devDependencies":{"@typescript-eslint/parser":"^7.17.0","doctoc":"^2.2.1","eslint":"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-doc-generator":"^1.7.1","eslint-plugin-eslint-plugin":"^6.2.0","eslint-plugin-jest":"^28.6.0","eslint-plugin-n":"^17.9.0","eslint-plugin-prettier":"^5.2.1","globals":"^15.8.0","husky":"^9.1.1","jest":"^29.7.0","lint-staged":"^15.2.7","npm-run-all2":"^6.2.2","prettier":"^3.3.3","typescript":"~5.6.0"},"peerDependencies":{"eslint":"^7.0.0 || ^8.0.0 || ^9.0.0"},"engines":{"node":"^18.18.0 || ^20.9.0 || >=21.1.0"},"funding":"https://opencollective.com/eslint","dependencies":{"@eslint-community/eslint-utils":"^4.4.0"},"_id":"eslint-plugin-promise@7.2.1","gitHead":"6bda06446b51a74309e18fab4f2bb758dd6aa714","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==","shasum":"a0652195700aea40b926dc3c74b38e373377bfb0","tarball":"http://registry-npm.ywwl.com/eslint-plugin-promise/download/eslint-plugin-promise-7.2.1.tgz","fileCount":36,"unpackedSize":96606,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/eslint-plugin-promise@7.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBvoiMKjTGK1EJ4bwYMEkHInFT+gm+jEjpTilmvpKPA1AiEAsJwQXwgEHg/mxtgLnWLMmOYWLi8G9FXmuHvyvZgAnKA="}],"size":22619,"noattachment":false,"key":"/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz"},"_npmUser":{"name":"eslint-community-bot","email":"contact+eslintcbot@eslint.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-promise_7.2.1_1732668561772_0.9325583648863813"},"_hasShrinkwrap":false,"readme":"# eslint-plugin-promise\n\nEnforce best practices for JavaScript promises.\n\n[![CI](https://github.com/eslint-community/eslint-plugin-promise/actions/workflows/ci.yml/badge.svg)](https://github.com/eslint-community/eslint-plugin-promise/actions/workflows/ci.yml)\n[![npm version](https://badge.fury.io/js/eslint-plugin-promise.svg)](https://www.npmjs.com/package/eslint-plugin-promise)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Rules](#rules)\n- [Maintainers](#maintainers)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```sh\nnpm install eslint --save-dev\n```\n\nNext, install `eslint-plugin-promise`:\n\n```sh\nnpm install eslint-plugin-promise --save-dev\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must\nalso install `eslint-plugin-promise` globally.\n\n## Usage\n\nAdd `promise` to the plugins section of your `.eslintrc.json` configuration\nfile. You can omit the `eslint-plugin-` prefix:\n\n```json\n{\n  \"plugins\": [\"promise\"]\n}\n```\n\nThen configure the rules you want to use under the rules section.\n\n```json\n{\n  \"rules\": {\n    \"promise/always-return\": \"error\",\n    \"promise/no-return-wrap\": \"error\",\n    \"promise/param-names\": \"error\",\n    \"promise/catch-or-return\": \"error\",\n    \"promise/no-native\": \"off\",\n    \"promise/no-nesting\": \"warn\",\n    \"promise/no-promise-in-callback\": \"warn\",\n    \"promise/no-callback-in-promise\": \"warn\",\n    \"promise/avoid-new\": \"warn\",\n    \"promise/no-new-statics\": \"error\",\n    \"promise/no-return-in-finally\": \"warn\",\n    \"promise/valid-params\": \"warn\",\n    \"promise/no-multiple-resolved\": \"error\"\n  }\n}\n```\n\nor start with the recommended rule set:\n\n- `eslint.config.js`:\n\n  ```js\n  import pluginPromise from 'eslint-plugin-promise'\n  export default [\n    // ...\n    pluginPromise.configs['flat/recommended'],\n  ]\n  ```\n\n- `.eslintrc.*`:\n\n  ```json\n  {\n    \"extends\": [\"plugin:promise/recommended\"]\n  }\n  ```\n\n## Rules\n\n<!-- begin auto-generated rules list -->\n\n💼 Configurations enabled in.\\\n⚠️ Configurations set to warn in.\\\n🚫 Configurations disabled in.\\\n✅ Set in the `flat/recommended` configuration.\\\n✅ Set in the `recommended` configuration.\\\n🔧 Automatically fixable by the\n[`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\n\n| Name                                                                 | Description                                                                                | 💼  | ⚠️  | 🚫  | 🔧  |\n| :------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- | :-- | :-- | :-- | :-- |\n| [always-return](docs/rules/always-return.md)                         | Require returning inside each `then()` to create readable and reusable Promise chains.     | ✅  |     |     |     |\n| [avoid-new](docs/rules/avoid-new.md)                                 | Disallow creating `new` promises outside of utility libs (use [util.promisify][] instead). |     |     | ✅  |     |\n| [catch-or-return](docs/rules/catch-or-return.md)                     | Enforce the use of `catch()` on un-returned promises.                                      | ✅  |     |     |     |\n| [no-callback-in-promise](docs/rules/no-callback-in-promise.md)       | Disallow calling `cb()` inside of a `then()` (use [util.callbackify][] instead).           |     | ✅  |     |     |\n| [no-multiple-resolved](docs/rules/no-multiple-resolved.md)           | Disallow creating new promises with paths that resolve multiple times.                     |     |     |     |     |\n| [no-native](docs/rules/no-native.md)                                 | Require creating a `Promise` constructor before using it in an ES5 environment.            |     |     | ✅  |     |\n| [no-nesting](docs/rules/no-nesting.md)                               | Disallow nested `then()` or `catch()` statements.                                          |     | ✅  |     |     |\n| [no-new-statics](docs/rules/no-new-statics.md)                       | Disallow calling `new` on a Promise static method.                                         | ✅  |     |     | 🔧  |\n| [no-promise-in-callback](docs/rules/no-promise-in-callback.md)       | Disallow using promises inside of callbacks.                                               |     | ✅  |     |     |\n| [no-return-in-finally](docs/rules/no-return-in-finally.md)           | Disallow return statements in `finally()`.                                                 |     | ✅  |     |     |\n| [no-return-wrap](docs/rules/no-return-wrap.md)                       | Disallow wrapping values in `Promise.resolve` or `Promise.reject` when not needed.         | ✅  |     |     |     |\n| [param-names](docs/rules/param-names.md)                             | Enforce consistent param names and ordering when creating new promises.                    | ✅  |     |     |     |\n| [prefer-await-to-callbacks](docs/rules/prefer-await-to-callbacks.md) | Prefer `async`/`await` to the callback pattern.                                            |     |     |     |     |\n| [prefer-await-to-then](docs/rules/prefer-await-to-then.md)           | Prefer `await` to `then()`/`catch()`/`finally()` for reading Promise values.               |     |     |     |     |\n| [prefer-catch](docs/rules/prefer-catch.md)                           | Prefer `catch` to `then(a, b)`/`then(null, b)` for handling errors.                        |     |     |     | 🔧  |\n| [spec-only](docs/rules/spec-only.md)                                 | Disallow use of non-standard Promise static methods.                                       |     |     |     |     |\n| [valid-params](docs/rules/valid-params.md)                           | Enforces the proper number of arguments are passed to Promise functions.                   |     | ✅  |     |     |\n\n<!-- end auto-generated rules list -->\n\n## Maintainers\n\n- Jamund Ferguson - [@xjamundx][]\n- Macklin Underdown - [@macklinu][]\n- Aadit M Shah - [@aaditmshah][]\n\n## License\n\n- (c) MMXV jden <mailto:jason@denizac.org> - ISC license.\n- (c) 2016 Jamund Ferguson <mailto:jamund@gmail.com> - ISC license.\n\n[util.callbackify]:\n  https://nodejs.org/docs/latest/api/util.html#utilcallbackifyoriginal\n[util.promisify]: https://nodejs.org/api/util.html#util_util_promisify_original\n[@aaditmshah]: https://github.com/aaditmshah\n[@macklinu]: https://github.com/macklinu\n[@xjamundx]: https://github.com/xjamundx\n","publish_time":1732668562009,"maintainers":[{"name":"michaeldeboey","email":"info@michaeldeboey.be"},{"name":"eslint-community-bot","email":"contact+eslintcbot@eslint.org"}],"_cnpm_publish_time":1732668562009,"dist-tags":{"latest":"7.3.0"}}