🌐
npm
npmjs.com › package › eslint-plugin-promise
eslint-plugin-promise - npm
Enforce best practices for JavaScript promises. Latest version: 7.2.1, last published: a year ago. Start using eslint-plugin-promise in your project by running `npm i eslint-plugin-promise`. There are 4879 other projects in the npm registry using eslint-plugin-promise.
      » npm install eslint-plugin-promise
    
Published   Nov 27, 2024
Version   7.2.1
Author   jden
🌐
GitHub
github.com › eslint-community › eslint-plugin-promise
GitHub - eslint-community/eslint-plugin-promise: Enforce best practices for JavaScript promises
Enforce best practices for JavaScript promises. ... Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-promise globally.
Starred by 986 users
Forked by 96 users
Languages   JavaScript 100.0% | JavaScript 100.0%
🌐
GitHub
github.com › eslint-community › eslint-plugin-promise › blob › main › CHANGELOG.md
eslint-plugin-promise/CHANGELOG.md at main · eslint-community/eslint-plugin-promise
no-callback-in-promise: false triggering of callback (#574) (8324564) ... deps: switch from dependabot to renovate using shared eslint community configuration (#537) (30efed7) deps: update @eslint-community/eslint-utils to v4.4.1 (#562) (5c3628d) ... This is a breaking change that drops support for Node v4. In order to use ESLint v5 and eslint-plugin-promise v4, you must use Node >=6.
Author   eslint-community
🌐
GitHub
github.com › eslint-community › eslint-plugin-promise › issues
eslint-community/eslint-plugin-promise
Enforce best practices for JavaScript promises. Contribute to eslint-community/eslint-plugin-promise development by creating an account on GitHub.
Author   eslint-community
🌐
GitHub
github.com › eslint-community › eslint-plugin-promise › releases
Releases · eslint-community/eslint-plugin-promise
Enforce best practices for JavaScript promises. Contribute to eslint-community/eslint-plugin-promise development by creating an account on GitHub.
Author   eslint-community
🌐
GitHub
github.com › eslint-community › eslint-plugin-promise › blob › main › README.md
eslint-plugin-promise/README.md at main · eslint-community/eslint-plugin-promise
You can omit the eslint-plugin- prefix: ... Then configure the rules you want to use under the rules section. { "rules": { "promise/always-return": "error", "promise/no-return-wrap": "error", "promise/param-names": "error", "promise/catch-or-return": "error", "promise/no-native": "off", "promise/no-nesting": "warn", "promise/no-promise-in-callback": "warn", "promise/no-callback-in-promise": "warn", "promise/avoid-new": "warn", "promise/no-new-statics": "error", "promise/no-return-in-finally": "warn", "promise/valid-params": "warn", "promise/no-multiple-resolved": "error" } }
Author   eslint-community
🌐
Npmdoc
npmdoc.github.io › node-npmdoc-eslint-plugin-promise › build › apidoc.html
function eslint-plugin-promise.rules.avoid-new (context)
create = function (context) { var MESSAGE = '"function eslint-plugin-promise.rules.no-native.create" is not defined.' /** * Checks for and reports reassigned constants * * @param {Scope} scope - an escope Scope object * @returns {void} * @private */ return { 'Program:exit': function () { var scope = context.getScope() scope.implicit.left.forEach(function (ref) { if (ref.identifier.name !== 'Promise') { return } if (!isDeclared(scope, ref)) { context.report(ref.identifier, MESSAGE, { name: ref.identifier.name }) } }) } } }
🌐
npm
npmjs.com › package › eslint-plugin-no-floating-promise
eslint-plugin-no-floating-promise - npm
Detects missing await on async function calls. Latest version: 2.0.0, last published: 2 years ago. Start using eslint-plugin-no-floating-promise in your project by running `npm i eslint-plugin-no-floating-promise`. There are 8 other projects ...
      » npm install eslint-plugin-no-floating-promise
    
Published   Apr 18, 2024
Version   2.0.0
Author   Sebastien Guillemot
Find elsewhere
🌐
CodeSandbox
codesandbox.io › examples › package › eslint-plugin-promise
eslint-plugin-promise examples - CodeSandbox
Use this online eslint-plugin-promise playground to view and fork eslint-plugin-promise example apps and templates on CodeSandbox.
🌐
Socket
socket.dev › npm › package › eslint-plugin-promise
eslint-plugin-promise - npm Package Security Analysis - Sock...
It helps to enforce best practices and catch common mistakes when using async/await, but it does not focus on promises directly. Part of the 'eslint-plugin-standard' plugin includes rules that are applicable to promises, as it adheres to the JavaScript Standard Style.
🌐
GitHub
github.com › eslint-community › eslint-plugin-promise › blob › main › docs › rules › always-return.md
eslint-plugin-promise/docs/rules/always-return.md at main · eslint-community/eslint-plugin-promise
You can pass an { ignoreAssignmentVariable: [] } as an option to this rule with a list of variable names so that the last then() callback in a promise chain does not warn if it does an assignment to a global variable. Default is ["globalThis"]. /* eslint promise/always-return: ["error", { ignoreAssignmentVariable: ["globalThis"] }] */ // OK promise.then((x) => { globalThis = x }) promise.then((x) => { globalThis.x = x }) // OK promise.then((x) => { globalThis.x.y = x }) // NG promise.then((x) => { anyOtherVariable = x }) // NG promise.then((x) => { anyOtherVariable.x = x }) // NG promise.then((x) => { x() })
Author   eslint-community
🌐
Cloudsmith
cloudsmith.com › navigator › npm › eslint-plugin-promise
eslint-plugin-promise (7.2.1) - npm Package Quality | Cloudsmith Navigator
Learn all about the quality, security, and current maintenance status of eslint-plugin-promise using Cloudsmith Navigator
🌐
GitHub
github.com › eslint-community › eslint-plugin-promise › blob › main › docs › rules › prefer-await-to-then.md
eslint-plugin-promise/docs/rules/prefer-await-to-then.md at main · eslint-community/eslint-plugin-promise
Enforce best practices for JavaScript promises. Contribute to eslint-community/eslint-plugin-promise development by creating an account on GitHub.
Author   eslint-community
🌐
Npm
npm.io › package › eslint-plugin-promise
Eslint-plugin-promise NPM | npm.io
Enforce best practices for JavaScript promises. ... Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-promise globally.
🌐
GitHub
github.com › eslint-community › eslint-plugin-promise › blob › main › docs › rules › param-names.md
eslint-plugin-promise/docs/rules/param-names.md at main · eslint-community/eslint-plugin-promise
new Promise(function (reject, resolve) { ... }) // incorrect order new Promise(function (ok, fail) { ... }) // non-standard parameter names new Promise(function (_, reject) { ...
Author   eslint-community