Closed Bug 1579452 Opened Last month Closed 27 days ago

Enable ESLint rule no-async-promise-executor on disabled locations for devtools

Categories

(DevTools :: General, task, P3)

task
Points:
1

Tracking

(firefox71 fixed)

RESOLVED FIXED
Firefox 71
Iteration:
71.2 - Sept 16 - 29
Tracking Status
firefox71 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When we upgraded to ESLint 6, we disabled the no-async-promise-executor rule for various files as it wasn't a quick enable.

This bug is for devtools/

Some notes about this rule (from ESlint's site):

The Promise executor function can be an async function. However, this is usually a mistake, for a few reasons:

  • If an async executor function throws an error, the error will be lost and won’t cause the newly-constructed Promise to reject. This could make it difficult to debug and handle some errors.
  • If a Promise executor function is using await, this is usually a sign that it is not actually necessary to use the new Promise constructor, or the scope of the new Promise constructor can be reduced.
Assignee: nobody → standard8
Status: NEW → ASSIGNED
Iteration: --- → 71.2 - Sept 16 - 29
Points: --- → 1
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/44d3b8582d36
Enable ESLint rule no-async-promise-executor on disabled locations for devtools. r=jlast
Status: ASSIGNED → RESOLVED
Closed: 27 days ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
You need to log in before you can comment on or make changes to this bug.