Change ESLint rule no-shadow to be enabled by default and disabled where it currently fails
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox132 fixed)
Tracking | Status | |
---|---|---|
firefox132 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(6 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
For switching eslint-plugin-mozilla to the ESLint flat configuration, one item we need to do is to separate out the overrides
sections of recommended.js to separate configurations, due to how the flat config works with respect to plugins (bug 1917529).
Having looked at this, it would be simpler to split the configurations if we change how the no-shadow rule is handled for builtinGlobals. Currently the builtinGlobals part is enabled for modules, but disabled for system modules & workers.
As a follow-up to this, I decided now would be a reasonable time to switch no-shadow to being disabled everywhere by default to being enabled everywhere & disabled where it currently fails. This should hopefully help to start having new code pick it up automatically.
Assignee | ||
Comment 1•1 month ago
|
||
Assignee | ||
Comment 2•1 month ago
|
||
Assignee | ||
Comment 3•1 month ago
|
||
Assignee | ||
Comment 4•1 month ago
|
||
Assignee | ||
Comment 5•1 month ago
|
||
This moves the ESLint rule to apply to jsx, system modules and workers. It is excluded from most system
modules by the roll out, which we can work on later. However, it will be enabled where no-shadow is
already enabled - previously these were hidden due to the order in which ESLint was applying the rules.
Assignee | ||
Comment 6•1 month ago
|
||
Comment 8•1 month ago
|
||
Backed out for causing node newtab failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/26f637a20dc180da705cb962f1c6acc84cd98277
Failure log -> TEST-UNEXPECTED-FAIL | bundles | about:asrouter bundle out of date
Assignee | ||
Updated•1 month ago
|
Comment 10•1 month ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5344eb368840
https://hg.mozilla.org/mozilla-central/rev/cdab6319ec9f
https://hg.mozilla.org/mozilla-central/rev/60aa562befe5
https://hg.mozilla.org/mozilla-central/rev/66db0a99fe46
https://hg.mozilla.org/mozilla-central/rev/ebda61c817e4
https://hg.mozilla.org/mozilla-central/rev/ae57dc81f58d
Description
•