Migrate ESLint configuration to flat config
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox140 fixed)
Tracking | Status | |
---|---|---|
firefox140 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
(Depends on 1 open bug, Blocks 5 open bugs)
Details
Attachments
(15 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 | |
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 upgrading to ESLint v9, we think we can first migrate to the flat configuration in v8, before upgrading to v9 itself.
To do this we'll need to fix the issues this depends on and then investigate:
- Importing the ESLint ignore file.
- Secondary thought: could it be merged/shared with the prettier file?
- Are there any more simple sub-level
.eslintrc.js
files that could be cleaned up and merged into the top-level config, or their parents? - Convert the top-level
.eslintrc.js
file toeslint.config.mjs
- For the sub-level
.eslintrc.js
files, load those (via an explicit list), into the top-level configuration and add them to the list of configurations.
- For the sub-level
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Comment 1•1 month ago
|
||
I now have patches for this. They are a bit complex, but seem to work, and there's probably going to be lots of follow-ups to do later. However, aiming to get these landed before the 140 freeze, so that ESR will at least have all the changed settings files, in case changes need to be uplifted.
Assignee | ||
Comment 2•1 month ago
|
||
Assignee | ||
Comment 3•1 month ago
|
||
This is separate to help preserve history of the files.
Assignee | ||
Comment 4•1 month ago
|
||
This also sets up recommended.js to match against the required file extensions, which is needed for the configuration to work correctly.
Assignee | ||
Comment 5•1 month ago
|
||
This consolidates the jest environment definition, and the xpcshell globals into the devtools/.eslintrc.mjs file, for easier configurations.
It also changes the restart of the configurations to work with flat config.
Assignee | ||
Comment 6•1 month ago
|
||
Assignee | ||
Comment 7•1 month ago
|
||
Assignee | ||
Comment 8•1 month ago
|
||
Assignee | ||
Comment 9•1 month ago
|
||
Assignee | ||
Comment 10•1 month ago
|
||
This helps fix raised issues in customizable UI code which turns rules off in its own directory.
Assignee | ||
Comment 11•1 month ago
|
||
Assignee | ||
Comment 12•1 month ago
|
||
Assignee | ||
Comment 13•1 month ago
|
||
Assignee | ||
Comment 14•1 month ago
|
||
Assignee | ||
Comment 15•1 month ago
|
||
Assignee | ||
Comment 16•1 month ago
|
||
This completes the moving of all the top-level configuration files to be ES modules, and named similarily.
Comment 17•29 days ago
|
||
Comment 18•29 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eb2701d51897
https://hg.mozilla.org/mozilla-central/rev/d3114c8f716e
https://hg.mozilla.org/mozilla-central/rev/e3c80f00b02b
https://hg.mozilla.org/mozilla-central/rev/000233049ab0
https://hg.mozilla.org/mozilla-central/rev/30bb0943828a
https://hg.mozilla.org/mozilla-central/rev/22e7ea4dde93
https://hg.mozilla.org/mozilla-central/rev/2d52ba4350fd
https://hg.mozilla.org/mozilla-central/rev/1f962d559236
https://hg.mozilla.org/mozilla-central/rev/62ad4b186ae9
https://hg.mozilla.org/mozilla-central/rev/363a2a5d0a21
https://hg.mozilla.org/mozilla-central/rev/968062cd7933
https://hg.mozilla.org/mozilla-central/rev/07433b508a89
https://hg.mozilla.org/mozilla-central/rev/c78852cfbe1b
https://hg.mozilla.org/mozilla-central/rev/8a96bebed69f
https://hg.mozilla.org/mozilla-central/rev/a58949ca6435
Description
•