eslint-plugin-promise
eslint-plugin-promise copied to clipboard
Enforce best practices for JavaScript promises
We need to add recommended value for no-multiple-resolved rule **What is the purpose of this pull request?** - [ x] Documentation update - [ ] Bug fix - [ ]...
**What is the purpose of this pull request?** - [ ] Documentation update - [ ] Bug fix - [ ] New rule - [ ] Changes an existing rule...
### Description Rule promise/prefer-await-to-callbacks incorrectly warns on library methods. It should check only code in project. ### Steps to Reproduce 1. Project with electron written in TypeScript. 2. Use cookies...
`makePromise().then(thenHandler, catchHandler)` is incorrectly considered correct by the always-catch plugin when `allowThen: true` is specified. While the `catchHandler` will handle a rejection of the `Promise` returned by `makePromise()`, it will...
Today there are many libraries that enhance the ECMA standard, like bluebird. It will be very helpful if we can enforce only usage of the standard and not super-set.
### Description I configured the rule like that: ``` 'promise/prefer-await-to-then': 'error' ``` This code doesn't give me an error, though: ``` function foo(): void { alert('test'); } const test =...
It has been requested that we support these use cases in the `no-callback-in-promise` rule ``` // TODO: support safe callbacks // 'whatever.then((err) => { process.nextTick(() => cb()) })', // 'whatever.then((err)...
See: eslint/eslint#5761 Rule to throw when the identify function is used as the success handler of a Promise or the "throw function" is used as the failure handler of a...
Run for all files in lint-staged, and check on CI through `lint` **What is the purpose of this pull request?** - [ ] Documentation update - [ ] Bug fix...