Closed Bug 1341029 Opened 8 years ago Closed 8 years ago

Enable eslint no-undef for toolkit

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files)

I'm working on a couple of patches to get no-undef enabled for all of toolkit/. We're not far off now, so hopefully I'll have this up in a few days.
Depends on: 1341031
Depends on: 1341571
Note: I can't land this until the dependent bugs land, but lets get it reviewed & ready so that we can land it fairly soon to avoid more no-undefs creeping in.
Comment on attachment 8839900 [details] Bug 1341029 - Add more 'globals' for browserjs equivalent imports, and for test imports. https://reviewboard.mozilla.org/r/114490/#review116002
Attachment #8839900 - Flags: review?(dtownsend) → review+
Comment on attachment 8839901 [details] Bug 1341029 - Turn on the ESLint no-undef rule for all of toolkit/. https://reviewboard.mozilla.org/r/114492/#review116146 This is great! Thank you for doing this! :) ::: toolkit/components/.eslintrc.js:3 (Diff revision 1) > module.exports = { > "rules": { > - "no-undef": "off" > } Can this file be removed now? ::: toolkit/content/.eslintrc.js:5 (Diff revision 1) > "use strict"; > > module.exports = { > "rules": { > - "no-undef": "off" > + "mozilla/import-browserjs-globals": "warn", Is there a plan for marking "import-browserjs-globals" as "error" ? ::: toolkit/content/widgets/colorpicker.xml (Diff revision 1) > > <binding id="colorpickertile" role="xul:colorpickertile"> > </binding> > > </bindings> > - Should we keep a newline at the end of this file? ::: toolkit/content/widgets/toolbar.xml (Diff revision 1) > <xul:label xbl:inherits="value=title"/> > </content> > </binding> > > </bindings> > - Should we keep a newline at the end of this file?
Attachment #8839901 - Flags: review?(jaws) → review+
Comment on attachment 8839901 [details] Bug 1341029 - Turn on the ESLint no-undef rule for all of toolkit/. https://reviewboard.mozilla.org/r/114492/#review116146 > Can this file be removed now? I was debating about it as we might want it for other things, but lets drop it for now. > Is there a plan for marking "import-browserjs-globals" as "error" ? I don't think it really matters, as the rule doesn't produce anything that is an error or not. > Should we keep a newline at the end of this file? There is for both of these, my editor was automatically removing an extra newline at the end of the file.
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/96e5f8480e11 Add more 'globals' for browserjs equivalent imports, and for test imports. r=mossop https://hg.mozilla.org/integration/autoland/rev/6055065a2ed5 Turn on the ESLint no-undef rule for all of toolkit/. r=jaws
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/bba5e0634259 Turn on the ESLint no-undef rule for all of toolkit/: revert an assert argument back to true. r=intermittent-fix
Depends on: 1348954
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: