Closed
Bug 1342459
Opened 8 years ago
Closed 8 years ago
Enable eslint no-undef for browser/
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(3 files)
I'm working on a couple of patches to get no-undef enabled for all of browser/. It is already enabled for some of browser, but it is time to get it everywhere.
Assignee | ||
Comment 1•8 years ago
|
||
For those watching, this is still in my queue - the remaining bit is browser/base. Currently I'm waiting on the bugs that block this, and also doing some more general refactoring of eslint-plugin-mozilla to make it easier to use elsewhere (bug 1347645).
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•8 years ago
|
||
I was going to wait a bit for these last patches, but it happened the other night in-between waiting for things.
The patches I've just attached fix the last 100 or so issues in browser/base.
I think there's more potential improvements to do for no-undef, and cleaning up some globals definitions, but they can wait whilst I get some other eslint issues sorted out.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 11•8 years ago
|
||
mozreview-review |
Comment on attachment 8855239 [details]
Bug 1342459 - Add a rule to automatically detect ContentTask.spawn and inject the relevant globals.
https://reviewboard.mozilla.org/r/127100/#review129988
::: tools/lint/eslint/eslint-plugin-mozilla/lib/rules/import-content-task-globals.js:32
(Diff revision 3)
> + // ---------------------------------------------------------------------------
> + // Public
> + // ---------------------------------------------------------------------------
> +
> + return {
> + "CallExpression[callee.object.name='ContentTask'][callee.property.name='spawn']": function(node) {
Oh this is nice syntax, is that a new eslint feature?
Attachment #8855239 -
Flags: review?(dtownsend) → review+
Assignee | ||
Comment 12•8 years ago
|
||
(In reply to Dave Townsend [:mossop] from comment #11)
> > + "CallExpression[callee.object.name='ContentTask'][callee.property.name='spawn']": function(node) {
>
> Oh this is nice syntax, is that a new eslint feature?
Yes, added in 3.18.0. I'm planning on rolling it out to wherever we can soon.
http://eslint.org/blog/2017/03/eslint-v3.18.0-released
Comment 13•8 years ago
|
||
mozreview-review |
Comment on attachment 8855240 [details]
Bug 1342459 - Enable no-undef on browser/base, and clean up unnecessary no-undef references.
https://reviewboard.mozilla.org/r/127102/#review130066
Attachment #8855240 -
Flags: review?(dtownsend) → review+
Comment 14•8 years ago
|
||
mozreview-review |
Comment on attachment 8855238 [details]
Bug 1342459 - Fix various no-undef issues in browser/base.
https://reviewboard.mozilla.org/r/127098/#review130048
I wonder if it would be easier to just define content as a global, but then we open the door for all the other window properties I guess.
Attachment #8855238 -
Flags: review?(dtownsend) → review+
Assignee | ||
Comment 15•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8855238 [details]
Bug 1342459 - Fix various no-undef issues in browser/base.
https://reviewboard.mozilla.org/r/127098/#review130048
Yeah, I did wonder about doing it differently, but the entire list of properties would be quite big (and also not appropriate in some files like .jsm).
Comment 16•8 years ago
|
||
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/28d99fb23327
Fix various no-undef issues in browser/base. r=mossop
https://hg.mozilla.org/integration/autoland/rev/88f6f749466f
Add a rule to automatically detect ContentTask.spawn and inject the relevant globals. r=mossop
https://hg.mozilla.org/integration/autoland/rev/ca3083864db1
Enable no-undef on browser/base, and clean up unnecessary no-undef references. r=mossop
Comment 17•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/28d99fb23327
https://hg.mozilla.org/mozilla-central/rev/88f6f749466f
https://hg.mozilla.org/mozilla-central/rev/ca3083864db1
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Comment 18•8 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•