Closed
Bug 1361859
Opened 8 years ago
Closed 7 years ago
Enable eslint on caps/
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement)
Developer Infrastructure
Lint and Formatting
Tracking
(firefox55 fixed)
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: gbrown, Assigned: gbrown)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•8 years ago
|
||
Changes are mostly mechanical substitutions. All the js files in caps/ are under caps/tests.
browser_checkloaduri.js has a curious structure that seems to confuse eslint on several counts; rather than try to address all the issues with annotations, I thought it best to just skip the file.
Attachment #8864539 -
Flags: review?(standard8)
Assignee | ||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Comment on attachment 8864539 [details] [diff] [review]
enable eslint on caps/
Review of attachment 8864539 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, but there's a couple of things I think we can improve on.
::: caps/tests/mochitest/.eslintrc.js
@@ +1,5 @@
> +"use strict";
> +
> +module.exports = {
> + "extends": [
> + "plugin:mozilla/mochitest-test"
The browser_checkloaduri.js issue is because caps is including mochitests & browser tests in the same directory (see the mochitest.ini and browser.ini). As a result, you need to add:
"plugin:mozilla/browser-test",
here, that should solve most of the issues in that file.
Alternately file a follow-up, and we'll set it up as a mentored bug once this lands.
::: caps/tests/mochitest/test_bug292789.html
@@ +25,4 @@
> ** even for ALLOW_CHROME mechanisms (<script>, <img> etc)
> **/
>
> +/* globals gTreeUtils */
Since this file is actually loading the treeUtils.js script, it is cleaner to do:
/* import-globals-from ../../../toolkit/content/treeUtils.js */
That'll also mean if anyone changes gTreeUtils in that file, and misses this test, then eslint will pick it up.
Attachment #8864539 -
Flags: review?(standard8)
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 4•8 years ago
|
||
I added the browser-test plugin: It fixes all the "easy" issues in that test, but not the ones that are giving me pause -- I filed bug 1362421 to follow-up.
I also changed from globals to import-globals-from - I totally agree that's better. Thanks!
Attachment #8864539 -
Attachment is obsolete: true
Attachment #8864891 -
Flags: review?(standard8)
Comment 5•7 years ago
|
||
Comment on attachment 8864891 [details] [diff] [review]
enable eslint on caps/
Review of attachment 8864891 [details] [diff] [review]:
-----------------------------------------------------------------
Great, thanks for the updates.
Attachment #8864891 -
Flags: review?(standard8) → review+
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b99cdf171a9b
Enable eslint on caps/ directory; r=standard8
Comment 7•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
Product: Testing → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•