Enable ESLint rule require-expected-throws-or-rejects for remaining directories

RESOLVED FIXED in Firefox 62

Status

()

enhancement
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

Trunk
Firefox 62
Points:
---

Firefox Tracking Flags

(firefox62 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

a year ago
This is continuing roll-out of require-expected-throws-or-rejects as per bug 1452706.
(Assignee)

Updated

a year ago
No longer depends on: 1465762
(Assignee)

Comment 3

a year ago
Comment on attachment 8983018 [details]
Bug 1466497 - Enable ESLint rule require-expected-throws-or-rejects for head_devtools_inspector_sidebar.js.

This change is upsetting browser_ext_devtools_panels_elements_sidebar.js that seems to import the head file. Cancelling review whilst I take a look.
Attachment #8983018 - Flags: review?(jdescottes)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 6

a year ago
mozreview-review
Comment on attachment 8983019 [details]
Bug 1466497 - Enable ESLint rule require-expected-throws-or-rejects for storage/test/unit.

https://reviewboard.mozilla.org/r/248882/#review255226
Attachment #8983019 - Flags: review?(mak77) → review+

Comment 7

a year ago
mozreview-review
Comment on attachment 8983018 [details]
Bug 1466497 - Enable ESLint rule require-expected-throws-or-rejects for head_devtools_inspector_sidebar.js.

https://reviewboard.mozilla.org/r/248880/#review255386

Thanks for the patch!

::: devtools/client/inspector/extensions/test/head_devtools_inspector_sidebar.js:42
(Diff revision 2)
>  // on the remote debugging server
>  // (used in browser_ext_devtools_panels_elements_sidebar.js).
>  async function expectNoSuchActorIDs(client, actors) {
>    info(`Test that all the objectValueGrip actors have been released`);
>    for (const actor of actors) {
> +    const re = new RegExp(`No such actor for ID: ${actor}`);

Could we do a string comparison rather than using a regexp built from string concatenation?
Attachment #8983018 - Flags: review?(jdescottes) → review+
(Assignee)

Comment 8

a year ago
mozreview-review-reply
Comment on attachment 8983018 [details]
Bug 1466497 - Enable ESLint rule require-expected-throws-or-rejects for head_devtools_inspector_sidebar.js.

https://reviewboard.mozilla.org/r/248880/#review255386

> Could we do a string comparison rather than using a regexp built from string concatenation?

Yes, now that we're using the function form. I was getting too obsessed by RegExps :-)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 11

a year ago
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c9c090ac9e24
Enable ESLint rule require-expected-throws-or-rejects for head_devtools_inspector_sidebar.js. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/e83a2d180ff5
Enable ESLint rule require-expected-throws-or-rejects for storage/test/unit. r=mak

Comment 12

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c9c090ac9e24
https://hg.mozilla.org/mozilla-central/rev/e83a2d180ff5
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
You need to log in before you can comment on or make changes to this bug.