Closed Bug 1430923 Opened 8 years ago Closed 8 years ago

Handle EXPORTED_SYMBOLS in ESLint to help define globals in jsm files

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files)

Now that we have glob-based configuration, we should work towards making our module files have no-unused-vars for all variables (including global), rather than just local to functions. As the first step of this, we should tell ESLint to mark variables exported by "EXPORTED_SYMBOLS" as used. Additionally, in discussing the various flavours of EXPORTED_SYMBOLS, Ted Campbell tells me that we should not allow `let EXPORTED_SYMBOLS = ...` as strictly speaking the lexical scope should be dead after the script executes (and may impact future work).
Comment on attachment 8943058 [details] Bug 1430923 - Change existing instances of 'let EXPORTED_SYMBOLS = ' to use 'var'. https://reviewboard.mozilla.org/r/213328/#review219458
Attachment #8943058 - Flags: review?(dtownsend) → review+
Comment on attachment 8943059 [details] Bug 1430923 - Handle EXPORTED_SYMBOLS in ESLint to help define globals in jsm files, and disallow 'let EXPORTED_SYMBOLS = '. https://reviewboard.mozilla.org/r/213330/#review219460
Attachment #8943059 - Flags: review?(dtownsend) → review+
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d5548c012d2b Change existing instances of 'let EXPORTED_SYMBOLS = ' to use 'var'. r=mossop https://hg.mozilla.org/integration/autoland/rev/c1895745ba10 Handle EXPORTED_SYMBOLS in ESLint to help define globals in jsm files, and disallow 'let EXPORTED_SYMBOLS = '. r=mossop
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Blocks: 1434446
Product: Testing → Firefox Build System
Version: Version 3 → 3 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: