Open Bug 1362972 Opened 8 years ago Updated 2 years ago

Add an ESLint rule to detect some cases of promise chains that are not terminated

Categories

(Toolkit :: Async Tooling, enhancement)

enhancement

Tracking

()

People

(Reporter: Paolo, Unassigned)

References

Details

Most promise chains should end with ".catch(Cu.reportError);" or ".catch(() => {});". We cannot detect all misuses, but we can likely detect the most common ones by checking that return value of ".then()" or a call to an async function is never ignored, but is stored in a variable, propagated via "return", or fed to ".catch()".
Depends on: 1362970
We could potentially use some or all of the rules from this plugin: https://github.com/xjamundx/eslint-plugin-promise
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.