Switch to ESLint v9.6.0
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox141 fixed)
Tracking | Status | |
---|---|---|
firefox141 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
(Blocks 3 open bugs)
Details
Attachments
(6 files, 1 obsolete file)
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 |
Once we've migrated to flat config (bug 1881701), we should upgrade to ESLint v9 itself.
Assignee | ||
Comment 1•28 days ago
|
||
I'm starting off with a small bump to ESLint 9.6.0 to avoid having to get us onto the 9.x series. There's more issues to resolve if we go all the way to 9.27.0 in one jump, though I've not looked into how much work they'll take to resolve. So what I'd like to do is get to 9.6.0, clean up eslint-plugin-mozilla (to remove all the pre-v9 support code), and then investigate updating to the latest. This will also help with more investigation of new features along the way.
For the 9.6.0 jump, the release notes can be found here:
- https://eslint.org/blog/2024/04/eslint-v9.0.0-released/
- https://eslint.org/blog/2024/04/eslint-v9.1.0-released/
- https://eslint.org/blog/2024/05/eslint-v9.2.0-released/
- https://eslint.org/blog/2024/05/eslint-v9.3.0-released/
- https://eslint.org/blog/2024/05/eslint-v9.4.0-released/
- https://eslint.org/blog/2024/06/eslint-v9.5.0-released/
- https://eslint.org/blog/2024/06/eslint-v9.6.0-released/
I think the main highlights are:
- valid-jsdoc and require-jsdoc rules have been removed (not to be confused with the
valid-jsdoc
andrequire-jsdoc
configurations that we have in eslint-plugin-mozilla) - The complexity rule now also takes into account optional chaining and default values in destructuring patterns and parameters (which generally means higher complexity scores).
- The no-unused-vars rule has a new default value for the caughtErrors option (changed from "none" to "all")
- For now, I'm turning this off again, but we might want to consider enabling it in the future.
- reportUnusedDisableDirectives is on by default, but I'm turning it off in our configuration, will comment in bug 1904558 about the reasons.
- Intl is now recognized as a built-in global
- The no-constant-condition rule no longer reports while (true) loops as problems by default (xref)
Assignee | ||
Comment 2•28 days ago
|
||
Assignee | ||
Comment 3•28 days ago
|
||
Assignee | ||
Comment 4•28 days ago
|
||
Assignee | ||
Comment 5•28 days ago
|
||
Assignee | ||
Comment 6•28 days ago
|
||
This disables caughtErrors from everywhere. This is enabled by default in v9. We should work to enable this later.
This also changes the exported comments - ESLint is more strict about what it can handle, and doesn't like a star
in the middle of the comment.
Also tidies up some rules where they are no longer needed.
Assignee | ||
Comment 7•28 days ago
|
||
Assignee | ||
Comment 8•28 days ago
|
||
Updated•28 days ago
|
Assignee | ||
Updated•27 days ago
|
Updated•26 days ago
|
Comment 10•26 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1b43d3819198
https://hg.mozilla.org/mozilla-central/rev/5c4751bb8409
https://hg.mozilla.org/mozilla-central/rev/7112920935a5
https://hg.mozilla.org/mozilla-central/rev/418f8176bc99
https://hg.mozilla.org/mozilla-central/rev/3cc848387b54
https://hg.mozilla.org/mozilla-central/rev/964aadc52be9
Description
•