Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump eslint to ^9.11.1 and migrate to flat config #4727

Merged
merged 22 commits into from
Jan 9, 2025

Conversation

MajorLift
Copy link
Contributor

@MajorLift MajorLift commented Sep 24, 2024

Explanation

We recently released new versions of our ESLint packages to rely on ESLint 9. This PR bumps all of the ESLint-related packages in this repo to match, and migrates the current ESLint config into the new flat format. It also upgrades Prettier to v3.

References

Closes #4745.

Changelog

(N/A; developer-only change)

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Copy link

socket-security bot commented Sep 24, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/code-frame@7.26.2 environment 0 33.2 kB nicolo-ribaudo
npm/@babel/compat-data@7.26.3 None 0 66.5 kB nicolo-ribaudo
npm/@babel/core@7.26.0 environment, filesystem, unsafe 0 794 kB nicolo-ribaudo
npm/@babel/generator@7.26.3 None 0 546 kB nicolo-ribaudo
npm/@babel/helper-compilation-targets@7.25.9 environment 0 53.5 kB nicolo-ribaudo
npm/@babel/helper-module-imports@7.25.9 None 0 63.7 kB nicolo-ribaudo
npm/@babel/helper-module-transforms@7.26.0 None 0 161 kB nicolo-ribaudo
npm/@babel/helper-string-parser@7.25.9 None 0 31.8 kB nicolo-ribaudo
npm/@babel/helper-validator-identifier@7.25.9 None 0 48.3 kB nicolo-ribaudo
npm/@babel/helper-validator-option@7.25.9 None 0 11.8 kB nicolo-ribaudo
npm/@babel/helpers@7.26.0 None 0 863 kB nicolo-ribaudo
npm/@babel/parser@7.26.3 None 0 1.9 MB nicolo-ribaudo
npm/@babel/template@7.25.9 Transitive: environment +1 2.62 MB nicolo-ribaudo
npm/@babel/traverse@7.26.4 Transitive: environment +1 716 kB nicolo-ribaudo
npm/@es-joy/jsdoccomment@0.49.0 None 0 121 kB brettz9
npm/@eslint-community/eslint-utils@4.4.1 None +1 410 kB eslint-community-bot
npm/@eslint-community/regexpp@4.12.1 None 0 473 kB eslint-community-bot
npm/@eslint/config-array@0.19.1 None 0 315 kB eslintbot
npm/@eslint/core@0.9.1 None 0 60 kB eslintbot
npm/@eslint/eslintrc@3.2.0 filesystem, unsafe Transitive: environment +4 1.45 MB eslintbot
npm/@eslint/js@9.17.0 None 0 14.9 kB eslintbot, openjsfoundation
npm/@eslint/object-schema@2.1.5 None 0 57 kB eslintbot
npm/@eslint/plugin-kit@0.2.4 None 0 77.1 kB eslintbot
npm/@humanfs/core@0.19.1 None 0 72.7 kB nzakas
npm/@humanfs/node@0.16.6 None +1 89.5 kB nzakas
npm/@humanwhocodes/retry@0.4.1 None 0 64.9 kB nzakas
npm/@jest/schemas@29.6.3 None 0 6.07 kB simenb
npm/@metamask/auto-changelog@4.0.0 None +1 215 kB metamaskbot
npm/@metamask/create-release-branch@4.0.0 Transitive: environment, filesystem +2 283 kB metamaskbot
npm/@metamask/eslint-config-jest@14.0.0 None 0 12.2 kB metamaskbot
npm/@metamask/eslint-config-nodejs@14.0.0 unsafe 0 98.4 kB metamaskbot
npm/@metamask/eslint-config-typescript@14.0.0 None 0 22.7 kB metamaskbot
npm/@metamask/eslint-config@14.0.0 unsafe +1 307 kB metamaskbot
npm/@nolyfill/is-core-module@1.0.39 unsafe 0 2.71 kB sukkaw
npm/@sinclair/typebox@0.27.8 None 0 442 kB sinclair
npm/@types/doctrine@0.0.9 None 0 8.49 kB types
npm/@typescript-eslint/eslint-plugin@8.19.1 None 0 2.79 MB bradzacher, jameshenry
npm/@typescript-eslint/parser@8.19.1 None 0 18.9 kB bradzacher, jameshenry
npm/@typescript-eslint/scope-manager@8.19.1 None 0 626 kB bradzacher, jameshenry
npm/@typescript-eslint/type-utils@8.19.1 None 0 127 kB bradzacher, jameshenry
npm/@typescript-eslint/types@8.19.1 None 0 174 kB bradzacher, jameshenry
npm/@typescript-eslint/typescript-estree@8.19.1 None 0 594 kB bradzacher, jameshenry
npm/@typescript-eslint/utils@8.19.1 None 0 288 kB bradzacher, jameshenry
npm/@typescript-eslint/visitor-keys@8.19.1 None 0 19.6 kB bradzacher, jameshenry
npm/acorn@8.14.0 None 0 547 kB marijn
npm/are-docs-informative@0.0.2 None 0 13.6 kB joshuakgoldberg
npm/browserslist@4.24.4 None 0 64.9 kB ai
npm/caniuse-lite@1.0.30001690 None 0 2.15 MB caniuse-lite
npm/comment-parser@1.4.1 None 0 366 kB yavorskiys
npm/electron-to-chromium@1.5.79 None 0 154 kB kilianvalkhof
npm/enhanced-resolve@5.18.0 None 0 212 kB evilebottnawi, jhnns, sokra, ...1 more
npm/es-module-lexer@1.6.0 None 0 91.3 kB guybedford
npm/escalade@3.2.0 filesystem 0 12.4 kB lukeed
npm/eslint-compat-utils@0.5.1 filesystem 0 53.1 kB ota-meshi
npm/eslint-config-prettier@9.1.0 None 0 20.8 kB lydell
npm/eslint-import-resolver-typescript@3.7.0 None 0 52.6 kB jounqin
npm/eslint-plugin-es-x@7.8.0 None 0 409 kB eslint-community-bot
npm/eslint-plugin-import-x@4.6.1 None +1 790 kB jounqin
npm/eslint-plugin-jest@28.10.0 None 0 350 kB aaronabramov, jeysal, jsonp, ...6 more
npm/eslint-plugin-jsdoc@50.6.1 filesystem +1 2.1 MB gajus
npm/eslint-plugin-n@17.15.1 None 0 461 kB eslint-community-bot, weiran.zsd
npm/eslint-plugin-prettier@5.2.1 None 0 34.3 kB jounqin
npm/eslint-plugin-promise@7.2.1 None 0 96.6 kB eslint-community-bot
npm/eslint-scope@8.2.0 None 0 152 kB eslintbot
npm/eslint-visitor-keys@4.2.0 None 0 36.1 kB eslintbot
npm/eslint@9.17.0 environment Transitive: filesystem +6 3.42 MB eslintbot
npm/fast-glob@3.3.3 filesystem 0 98.4 kB mrmlnc
npm/file-entry-cache@8.0.0 filesystem 0 16 kB jaredwray
npm/flat-cache@4.0.1 filesystem 0 29.3 kB jaredwray
npm/get-tsconfig@4.8.1 filesystem 0 105 kB hirokiosame
npm/is-bun-module@1.3.0 None 0 11.8 kB sunset_techuila
npm/jsdoc-type-pratt-parser@4.1.0 None 0 245 kB jsdoc-type-pratt-parser
npm/jsesc@3.1.0 None 0 32.3 kB mathias
npm/ms@2.1.3 None 0 6.72 kB styfle
npm/node-releases@2.0.19 None 0 37.2 kB chicoxyzzy
npm/parse-imports@2.2.1 None 0 39.1 kB tomeraberbach
npm/picocolors@1.1.1 None 0 6.37 kB alexeyraspopov
npm/resolve-pkg-maps@1.0.0 None 0 15 kB hirokiosame
npm/slashes@3.0.12 None 0 26 kB chrisackerman
npm/stable-hash@0.0.4 None 0 5.46 kB quietshu
npm/synckit@0.9.2 environment 0 59.8 kB jounqin
npm/tapable@2.2.1 None 0 46.9 kB sokra
npm/ts-api-utils@2.0.0 None 0 353 kB joshuakgoldberg
npm/typescript-eslint@8.19.1 None 0 103 kB jameshenry
npm/update-browserslist-db@1.1.2 None 0 14.7 kB ai

🚮 Removed packages: npm/@babel/code-frame@7.24.7, npm/@babel/compat-data@7.25.4, npm/@babel/core@7.25.2, npm/@babel/generator@7.25.5, npm/@babel/helper-compilation-targets@7.25.2, npm/@babel/helper-module-imports@7.24.7, npm/@babel/helper-module-transforms@7.25.2, npm/@babel/helper-string-parser@7.24.8, npm/@babel/helper-validator-identifier@7.24.7, npm/@babel/helper-validator-option@7.24.8, npm/@babel/helpers@7.25.0, npm/@babel/highlight@7.24.7, npm/@babel/parser@7.25.4, npm/@babel/template@7.25.0, npm/@babel/traverse@7.25.4, npm/@es-joy/jsdoccomment@0.36.1, npm/@eslint-community/eslint-utils@4.4.0, npm/@eslint-community/regexpp@4.11.0, npm/@eslint/eslintrc@2.1.4, npm/@eslint/js@8.57.0, npm/@humanwhocodes/config-array@0.11.14, npm/@humanwhocodes/object-schema@2.0.3, npm/@metamask/auto-changelog@3.3.0, npm/@metamask/create-release-branch@3.1.0, npm/@metamask/eslint-config-jest@12.1.0, npm/@metamask/eslint-config-nodejs@12.1.0, npm/@metamask/eslint-config-typescript@12.1.0, npm/@metamask/eslint-config@12.2.0, npm/@types/json5@0.0.29, npm/@typescript-eslint/eslint-plugin@5.62.0, npm/@typescript-eslint/parser@5.62.0, npm/@typescript-eslint/scope-manager@5.62.0, npm/@typescript-eslint/type-utils@5.62.0, npm/@typescript-eslint/types@5.62.0, npm/@typescript-eslint/typescript-estree@5.62.0, npm/@typescript-eslint/utils@5.62.0, npm/@typescript-eslint/visitor-keys@5.62.0, npm/@ungap/structured-clone@1.2.0, npm/acorn@8.12.1, npm/ansi-align@3.0.1, npm/ansi-styles@3.2.1, npm/array-buffer-byte-length@1.0.1, npm/array-includes@3.1.8, npm/array.prototype.flat@1.3.2, npm/arraybuffer.prototype.slice@1.0.3, npm/boxen@7.1.1, npm/browserslist@4.23.3, npm/builtins@5.1.0, npm/caniuse-lite@1.0.30001653, npm/chalk@2.4.2, npm/clone@1.0.4, npm/color-convert@1.9.3, npm/color-name@1.1.3, npm/comlink@4.4.1, npm/comment-parser@1.3.1, npm/common-path-prefix@3.0.0, npm/data-view-buffer@1.0.1, npm/data-view-byte-length@1.0.1, npm/data-view-byte-offset@1.0.0, npm/defaults@1.0.4, npm/electron-to-chromium@1.5.13, npm/es-abstract@1.23.3, npm/es-define-property@1.0.0, npm/es-set-tostringtag@2.0.3, npm/es-shim-unscopables@1.0.2, npm/es-to-primitive@1.2.1, npm/escalade@3.1.2, npm/escape-string-regexp@1.0.5, npm/eslint-config-prettier@8.10.0, npm/eslint-formatter-codeframe@7.32.1, npm/eslint-import-resolver-typescript@2.7.1, npm/eslint-interactive@10.8.0, npm/eslint-module-utils@2.8.2, npm/eslint-plugin-es@4.1.0, npm/eslint-plugin-import@2.26.0, npm/eslint-plugin-jest@27.9.0, npm/eslint-plugin-jsdoc@39.9.1, npm/eslint-plugin-n@15.7.0, npm/eslint-plugin-prettier@4.2.1, npm/eslint-plugin-promise@6.6.0, npm/eslint-scope@5.1.1, npm/eslint-utils@3.0.0, npm/eslint@8.57.0, npm/fast-glob@3.3.2, npm/fast-uri@3.0.1, npm/file-entry-cache@6.0.1, npm/find-cache-dir@4.0.0, npm/flat-cache@3.2.0, npm/function.prototype.name@1.1.6, npm/functions-have-names@1.2.3, npm/get-intrinsic@1.2.4, npm/get-symbol-description@1.0.2, npm/global-dirs@3.0.1, npm/globalthis@1.0.4, npm/globby@11.1.0, npm/gopd@1.0.1, npm/has-bigints@1.0.2, npm/has-flag@3.0.0, npm/has-symbols@1.0.3, npm/has@1.0.4, npm/internal-slot@1.0.7, npm/is-array-buffer@3.0.4, npm/is-bigint@1.0.4, npm/is-boolean-object@1.1.2, npm/is-data-view@1.0.1, npm/is-date-object@1.0.5, npm/is-installed-globally@0.4.0, npm/is-interactive@2.0.0, npm/is-negative-zero@2.0.3, npm/is-number-object@1.0.7, npm/is-path-inside@3.0.3, npm/is-regex@1.1.4, npm/is-string@1.0.7, npm/is-symbol@1.0.4, npm/is-typed-array@1.1.13, npm/is-unicode-supported@1.3.0, npm/is-weakref@1.0.2, npm/isarray@2.0.5, npm/jsdoc-type-pratt-parser@3.1.0, npm/jsesc@2.5.2, npm/lodash.truncate@4.4.2, npm/log-symbols@5.1.0, npm/ms@2.1.2, npm/natural-compare-lite@1.4.0, npm/node-releases@2.0.18, npm/object-inspect@1.13.2, npm/object.assign@4.1.5, npm/object.values@1.2.0, npm/ora@6.3.1, npm/picocolors@1.0.1, npm/regexp.prototype.flags@1.5.2, npm/regexpp@3.2.0, npm/require-from-string@2.0.2, npm/safe-array-concat@1.1.2, npm/safe-regex-test@1.0.3, npm/set-function-name@2.0.2, npm/side-channel@1.0.6, npm/stdin-discarder@0.1.0, npm/string.prototype.trim@1.2.9, npm/string.prototype.trimend@1.0.8, npm/string.prototype.trimstart@1.0.8, npm/supports-color@5.5.0, npm/table@6.8.2, npm/text-table@0.2.0, npm/to-fast-properties@2.0.0, npm/tsconfig-paths@3.15.0, npm/tsutils@3.21.0, npm/typed-array-buffer@1.0.2, npm/typed-array-byte-length@1.0.1, npm/typed-array-byte-offset@1.0.2, npm/typed-array-length@1.0.6, npm/unbox-primitive@1.0.2, npm/update-browserslist-db@1.1.0, npm/wcwidth@1.0.1, npm/which-boxed-primitive@1.0.2

View full report↗︎

Copy link

socket-security bot commented Sep 24, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/@nolyfill/is-core-module@1.0.39

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

@MajorLift MajorLift force-pushed the jongsun/preview/240924-eslint9 branch 2 times, most recently from bf0f6eb to a680d66 Compare September 24, 2024 17:06
@MajorLift MajorLift force-pushed the jongsun/preview/240924-eslint9 branch from a680d66 to 792cf47 Compare September 24, 2024 17:09
@MajorLift MajorLift force-pushed the jongsun/preview/240924-eslint9 branch from 235f317 to 86311e7 Compare September 24, 2024 17:14
@MajorLift MajorLift changed the title [DNM] preview/eslint9 Bump eslint to ^9.11.1 and migrate to flat config Sep 30, 2024
@MajorLift MajorLift self-assigned this Sep 30, 2024
@mcmire
Copy link
Contributor

mcmire commented Dec 4, 2024

Updated to latest stable release of @metamask/eslint-config and friends. The lint pipeline now works but tests are failing.

@mcmire
Copy link
Contributor

mcmire commented Dec 4, 2024

@SocketSecurity ignore npm/@nolyfill/is-core-module@1.0.39

This is coming from eslint-import-resolver-typescript, which @metamask/eslint-config-typescript requires. We can't really control this.

@mcmire mcmire self-assigned this Dec 4, 2024
@mcmire mcmire marked this pull request as ready for review December 4, 2024 22:07
@mcmire mcmire requested review from a team as code owners December 4, 2024 22:07
@mcmire mcmire requested a review from a team as a code owner December 11, 2024 16:30
Copy link
Contributor Author

@MajorLift MajorLift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything LGTM! Thanks for getting this to the finish line :)

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving on behalf of Jongsun.

@mcmire mcmire enabled auto-merge (squash) January 9, 2025 16:50
@mcmire mcmire merged commit 3535d58 into main Jan 9, 2025
120 checks passed
@mcmire mcmire deleted the jongsun/preview/240924-eslint9 branch January 9, 2025 16:51
PatrykLucka pushed a commit that referenced this pull request Jan 13, 2025
We recently released new versions of our ESLint packages to rely on
ESLint 9. This PR bumps all of the ESLint-related packages in this repo
to match, and migrates the current ESLint config into the new flat
format. It also upgrades Prettier to v3.

---------

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESLint config format is deprecated
5 participants