Closed
Bug 1242893
Opened 8 years ago
Closed 6 years ago
Change the import-globals-from eslint custom rule to also register properties added to the top-level `this` in JSM modules as globals
Categories
(Developer Infrastructure :: Lint and Formatting, defect, P4)
Developer Infrastructure
Lint and Formatting
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: pbro, Unassigned)
Details
TIL: JSM modules that need to work on b2g too need to export their globals on `this`. So, for instance, in \devtools\client\framework\ToolboxProcess.jsm there are these 2 lines: this.EXPORTED_SYMBOLS = ["BrowserToolboxProcess"]; this.BrowserToolboxProcess = function BrowserToolboxProcess(... The import-from-globals eslint rule https://dxr.mozilla.org/mozilla-central/source/testing/eslint-plugin-mozilla/lib/rules/import-globals-from.js is useful in many cases where you don't want to manually manage a list of globals in an eslint /*globals */ comment, but unfortunately, it doesn't well with these JSM modules.
Comment 1•8 years ago
|
||
Bug 1231963 is related. I think there's a general problem where these "helper rules" aren't run when trying to compute the globals of a file. See bug 1242584 for another example.
Component: General → ESLint
Updated•7 years ago
|
Priority: -- → P4
Updated•6 years ago
|
Product: Testing → Firefox Build System
Comment 2•6 years ago
|
||
In bug 1440284 we've moved away from using this.*, so I believe this is now a wontfix.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
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
•