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
(Blocks 2 open bugs, Regressed 1 open bug)
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.jsfiles that could be cleaned up and merged into the top-level config, or their parents? - Convert the top-level
.eslintrc.jsfile toeslint.config.mjs- For the sub-level
.eslintrc.jsfiles, 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•1 year ago
|
| Assignee | ||
Comment 1•10 months 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•10 months ago
|
||
| Assignee | ||
Comment 3•10 months ago
|
||
This is separate to help preserve history of the files.
| Assignee | ||
Comment 4•10 months 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•10 months 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•10 months ago
|
||
| Assignee | ||
Comment 7•10 months ago
|
||
| Assignee | ||
Comment 8•10 months ago
|
||
| Assignee | ||
Comment 9•10 months ago
|
||
| Assignee | ||
Comment 10•10 months ago
|
||
This helps fix raised issues in customizable UI code which turns rules off in its own directory.
| Assignee | ||
Comment 11•10 months ago
|
||
| Assignee | ||
Comment 12•10 months ago
|
||
| Assignee | ||
Comment 13•10 months ago
|
||
| Assignee | ||
Comment 14•10 months ago
|
||
| Assignee | ||
Comment 15•10 months ago
|
||
| Assignee | ||
Comment 16•10 months ago
|
||
This completes the moving of all the top-level configuration files to be ES modules, and named similarily.
Comment 17•10 months ago
|
||
Comment 18•10 months 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
•