Closed
Bug 1338249
Opened 7 years ago
Closed 7 years ago
Improve eslint-plugin-mozilla's handling of workers when dealing with globals and imports
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Tracking
(firefox54 fixed)
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(1 file)
There's a couple of things wrong with the current handling for workers: - It doesn't correctly detect globals from modules - It doesn't have an option if a worker doesn't have 'worker' in its filename. In the patch I'm addressing, I'm also dealing with some files imported into workers as modules.
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8835617 [details] Bug 1338249 - Improve eslint-plugin-mozilla's handling of workers when dealing with globals and imports. https://reviewboard.mozilla.org/r/111292/#review113510 Rather than using /* eslint-is-worker */ can we just create our own environment for workers then use /* eslint-env worker */ ? http://eslint.org/docs/developer-guide/working-with-plugins#environments-in-plugins
Attachment #8835617 -
Flags: review?(dtownsend)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
I hadn't noticed the environments option, but that's definitely a lot better. I also discovered there's already a "worker" environment, so extending that for chrome workers seems the good option.
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8835617 [details] Bug 1338249 - Improve eslint-plugin-mozilla's handling of workers when dealing with globals and imports. https://reviewboard.mozilla.org/r/111292/#review113876 ::: tools/lint/eslint/eslint-plugin-mozilla/package.json:3 (Diff revision 2) > { > "name": "eslint-plugin-mozilla", > "version": "0.2.20", Do we still need to bump the version number here?
Attachment #8835617 -
Flags: review?(dtownsend) → review+
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8835617 [details] Bug 1338249 - Improve eslint-plugin-mozilla's handling of workers when dealing with globals and imports. https://reviewboard.mozilla.org/r/111292/#review113880 ::: tools/lint/eslint/eslint-plugin-mozilla/package.json:3 (Diff revision 2) > { > "name": "eslint-plugin-mozilla", > "version": "0.2.20", Yes, please bump the version to force local users to update on next run.
Assignee | ||
Comment 7•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8835617 [details] Bug 1338249 - Improve eslint-plugin-mozilla's handling of workers when dealing with globals and imports. https://reviewboard.mozilla.org/r/111292/#review113876 > Do we still need to bump the version number here? Yes, that got lost in a rebase unfortunately. I'll add it back in.
Comment hidden (mozreview-request) |
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/03bfb1ccd33f Improve eslint-plugin-mozilla's handling of workers when dealing with globals and imports. r=mossop
Comment 10•7 years ago
|
||
sorry had to back this out for test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=77590058&repo=autoland
Flags: needinfo?(standard8)
Comment 11•7 years ago
|
||
Backout by cbook@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dee6c94829e4 Backed out changeset 03bfb1ccd33f for test failures in test_loading.xul
Assignee | ||
Comment 12•7 years ago
|
||
The test failures were due to the test expecting failures on specific line numbers, adding an eslint comment affected those. Hence I'm updating the test for the new line numbers, and adding a comment to warn others.
Flags: needinfo?(standard8)
Comment hidden (mozreview-request) |
Comment 14•7 years ago
|
||
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/49c83f6481dc Improve eslint-plugin-mozilla's handling of workers when dealing with globals and imports. r=mossop
Comment 15•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/49c83f6481dc
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Updated•6 years ago
|
Product: Testing → Firefox Build System
Updated•5 years ago
|
Version: Version 3 → 3 Branch
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
•