Closed Bug 1434449 Opened 8 years ago Closed 8 years ago

Enable no-unused-vars for global scope on jsm files in browser/base and browser/modules

Categories

(Firefox :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files)

We've got enough of a base now that I'd like to start getting no-unused-vars turned on for the global scope of jsms across the tree. This first patch set is going to fix issues in browser/base and browser/modules, and enable the rule across the tree, except for whitelisted directories - we'll then enable those in separate bugs, tracked by bug 1434446.
Comment on attachment 8946869 [details] Bug 1434449 - Removed some unused code in jsm files in browser/base and browser/modules. https://reviewboard.mozilla.org/r/216756/#review222568
Attachment #8946869 - Flags: review?(florian) → review+
Comment on attachment 8946870 [details] Bug 1434449 - Enable no-unused-vars for the global (as well as local) scope on jsm files, whitelist directories still to be fixed. . https://reviewboard.mozilla.org/r/216758/#review222570 Seems reasonable. I would be curious to see how many errors we have in the whitelisted folders. Isn't this a rule that supports --fix?
Attachment #8946870 - Flags: review?(florian) → review+
Comment on attachment 8946870 [details] Bug 1434449 - Enable no-unused-vars for the global (as well as local) scope on jsm files, whitelist directories still to be fixed. . https://reviewboard.mozilla.org/r/216758/#review222570 It doesn't support --fix, as I suspect there's some complexities in doing so (and if people have --fix as they type/save, then it could remove things they're working on). In the whitelisted folders there's about 60ish issues. Most of those are real (and simple), but there's a few that are false positivies - items are being accessed for unit tests via the hidden api, rather than being exported properly.
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5250ade2161b Removed some unused code in jsm files in browser/base and browser/modules. r=florian https://hg.mozilla.org/integration/autoland/rev/8552acda5ec7 Enable no-unused-vars for the global (as well as local) scope on jsm files, whitelist directories still to be fixed. r=florian.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: