Closed Bug 1395890 Opened 4 years ago Closed 4 years ago

Change all ESLint rules that are warnings to errors


(Firefox Build System :: Lint and Formatting, enhancement, P3)

3 Branch


(firefox58 fixed)

Tracking Status
firefox58 --- fixed


(Reporter: standard8, Assigned: dbugs)



(1 file)

There's a number of rules in the tree that are set up for warnings rather than errors.

Since warnings are frequently ignored or left unaddressed (and then just fill up consoles, making it hard to find real issues), I think we should go for making all the ESLint rules error all the time.
Priority: -- → P3
Comment on attachment 8909429 [details]
Bug 1395890 - Change all ESLint rules that are warnings to errors.

Looks great. r=Standard8
Attachment #8909429 - Flags: review?(standard8) → review+
Pushed by
Change all ESLint rules that are warnings to errors. r=standard8
Backed out for failing browser-chrome's browser/components/extensions/test/browser/browser_ext_find.js:

Push with failures:
Failure log:

[task 2017-09-19T10:51:41.402Z] 10:51:41     INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_find.js | Promise rejected, expecting rejection to match /no search results to highlight/, got "no search results to highlight": rejected Promise should pass the expected error - 
[task 2017-09-19T10:51:41.408Z] 10:51:41     INFO - Console message: [JavaScript Error: "SyntaxError: missing } after function body" {file: "data:,(function frameScript() {
[task 2017-09-19T10:51:41.409Z] 10:51:41     INFO -   function getSelectedText() {
[task 2017-09-19T10:51:41.411Z] 10:51:41     INFO -     // eslint-disable-next-line mozilla/no-cpows-in-tests
[task 2017-09-19T10:51:41.413Z] 10:51:41     INFO -     let frame = this.content.frames[0].frames[1];
[task 2017-09-19T10:51:41.415Z] 10:51:41     INFO -     let Ci = Components.interfaces;
[task 2017-09-19T10:51:41.416Z] 10:51:41     INFO -     let docShell = frame.QueryInterface(Ci.nsIInterfaceRequestor)
[task 2017-09-19T10:51:41.419Z] 10:51:41     INFO -                         .getInterface(Ci.nsIWebNavigation)
[task 2017-09-19T10:51:41.420Z] 10:51:41     INFO -                         .QueryInterface(Ci.nsIDocShell);
[task 2017-09-19T10:51:41.423Z] 10:51:41     INFO -     let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
[task 2017-09-19T10:51:41.427Z] 10:51:41     INFO -                              .getInterface(Ci.nsISel" line: 1 column: 1058 source: "xt: selection.toString(), rect});  }  getSelectedText();})()"}]
[task 2017-09-19T10:51:41.429Z] 10:51:41     INFO - Buffered messages finished
[task 2017-09-19T10:51:41.432Z] 10:51:41     INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_find.js | Test timed out -
Flags: needinfo?(dbugs)
Fwiw, the issue is this bit in browser_ext_find.js:

  let frameScriptUrl = `data:,(${frameScript})()`;

It's clever and all, but data: URI parsing (and all URI parsing, really) strips newlines.  So if you put a line comment in that function, you will get the entire function after that part commented out.
Flags: needinfo?(dbugs)
Pushed by
Change all ESLint rules that are warnings to errors. r=standard8
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Product: Testing → Firefox Build System
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.