Add handling of loadSubScript globals to ESLint
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox111 fixed)
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
Details
Attachments
(8 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 | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
In a lot of places, we're doing things like:
/* import-globals-from ../shared-head.js */
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js",
this
);
Since we know that chrome://mochitests/content/browser/
is effectively pointing to the base of the source tree, then in most instances we should be able to load the globals automatically without needing the import-globals-from
.
For this, we will need to set these globals as non-explicit, so that the no-unused-vars rule doesn't pick them up in the case of only using not all of the globals that are imported.
Doing this will make it easier for developers and cut down the amount of extra comments in the code base.
Assignee | ||
Comment 1•2 years ago
|
||
Try push (although most of it is comments-only so it shouldn't affect things, but just in case...): https://treeherder.mozilla.org/jobs?repo=try&revision=fa3a5f6d10d1562396038d8da41ec2053088a8a1
Assignee | ||
Comment 2•2 years ago
|
||
This is a better location for these functions and helps avoid circular dependencies in the next patches.
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D168067
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D168068
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D168069
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D168070
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D168071
Assignee | ||
Comment 8•2 years ago
|
||
Depends on D168072
Assignee | ||
Comment 9•2 years ago
|
||
Depends on D168073
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bc28a70ceac6
https://hg.mozilla.org/mozilla-central/rev/3279fa5e3cfb
https://hg.mozilla.org/mozilla-central/rev/3747e47fa4f2
https://hg.mozilla.org/mozilla-central/rev/9c8083315f17
https://hg.mozilla.org/mozilla-central/rev/c7d030abf4fb
https://hg.mozilla.org/mozilla-central/rev/e67aa87d79c2
https://hg.mozilla.org/mozilla-central/rev/3f4e3ed1e2b6
https://hg.mozilla.org/mozilla-central/rev/4fa7cb10f64e
Description
•