eslint-plugin-promise icon indicating copy to clipboard operation
eslint-plugin-promise copied to clipboard

Enforce best practices for JavaScript promises

Results 82 eslint-plugin-promise issues
Sort by recently updated
recently updated
newest added
trafficstars

when i start promise/catch-or-return rule, i must add catch method, although i don't care about error logic . empty catch callback makes me feel weird.

feedback-sought

### Description Rule to recommend using Promise static resolve/reject methods over `new Promise`, which saves a microtick and is more readable. Using `new Promise` for simple use cases is a...

enhancement

does it support typescript?

### Description I'm using `no-promise-in-callback` rule and defining top-level function with `err` (or `error`) parameter. Once I use `Promise.resolve` outside of `return` context, it reports an error. ### Steps to...

enhancement

### Description `promise/prefer-await-to-then` should not report errors if `.then`/`.catch` calls are inside constructor of some class Because we can't have `async constructor`

From #382, which I think wasn't fully fixed ```js try { resolve(someThrowingFn()) } catch (error) { reject(error) } ``` still errors for me. It doesn't error if I do this:...

### Description A rule could be created for the Promise constructor executor function to require that the resolve callback is called. Example of incorrect code for this rule: ```ts await...

enhancement

### Description When using the rule `promise/catch-or-return` you get a error with Cypress because they have a `then` method. https://docs.cypress.io/api/commands/then.html#Syntax ### Steps to Reproduce 1. Create repo with this module...

### Description Currently the rule is not enforced if a chain in async/await is correctly established. It could possibly have `strict` option to get rid of promise methods and prefer...