Closed Bug 1537776 Opened 7 months ago Closed 7 months ago

Enable ESLint rule no-throw-literal in dom/

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: Kwan, Assigned: Kwan)

References

Details

Attachments

(2 files)

no-throw-literal helps ensure that when we do throw errors, they come with stack traces that help track down the source of the error.

Result of running:
$ mach eslint -funix dom/ | sed -Ee 's/:.+//' - | xargs sed -E
-e 's/throw ((["])[^"]+\2);/throw new Error(\1);/g' \ -e 's/throw ((["])[^"]+\2 + [^ ";]+);/throw new Error(\1);/g'
-e 's/throw (/throw new Error(/g' -i

Attachment #9052596 - Attachment description: Bug 1537776 - dom/ automated ESLint no-throw-literal fixes. r=asuth!,handyman!,mrbkap! → Bug 1537776 - dom/ automated ESLint no-throw-literal fixes. r=asuth!,handyman!,mccr8!
Attachment #9052597 - Attachment description: Bug 1537776 - dom/ manual ESLint no-throw-literal fixes. r=mrbkap → Bug 1537776 - dom/ manual ESLint no-throw-literal fixes. r=mccr8
Priority: -- → P2

Green try with one intermittent:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=24bc50f11129ce3ecaee238f9fdc8c27fe5e7997

Sheriffs, this is for both this and bug 1536659.
If any later child revisions from other bugs show up in the stack by the time you get to this you don't need to worry about them, only push up to here
https://lando.services.mozilla.com/D24370/

Keywords: checkin-needed

Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/842871b6e080
dom/ automated ESLint no-throw-literal fixes. r=asuth,mccr8

Keywords: checkin-needed
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/55be3316a5cb
dom/ manual ESLint no-throw-literal fixes. r=asuth
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.