-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
chore: updated ESLint to v9 with flat config #7032
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working locally on my machine (Windows 10)
Thanks so much for this work @JoshuaKGoldberg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for giving time on that !
With all due respect, can I just hug you, Josh?!! Thank you so much for this contribution! Very very much appreciated 😭 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
* chore: updated ESLint to v9 with flat config * chore: missed an .eslintjscache
Description
Bumps ESLint to v9 and migrates the ESLint config from the legacy "eslintrc" format (
apps/site/.eslintrc.json
) to the new "flat" format (apps/site/eslint.config.js
). This brought a few complications 🙃...import
doesn't have ESLint v9 support (Support eslint v9 import-js/eslint-plugin-import#2948), so I moved to its successor/rival/something-like-thatimport-x
This also butted into some pre-existing issues:
stylelint-selector-bem-pattern
unintentionally has a dependency on an old version ofeslint-plugin-jest
, which has a dependency on an old version of@typescript-eslint/utils
: Request to move eslint-plugin-jest to devDependency simonsmith/stylelint-selector-bem-pattern#72.WARNING: You are currently running a version of TypeScript ...
(Set up i18n package #6991 (comment))--cache
doesn't work properly when you use cross-file linting, such asimport
's cross-fine analysis. I've removed it altogether in this PR. See: https://typescript-eslint.io/troubleshooting/faqs/eslint#can-i-use-eslints---cache-with-typescript-eslintThe lines of ESLint config code are about the same if we ignore temporary flat config compatibility layers and disables for transient issues:
main
: ~120 (~100.eslintrc.json
+ ~20.eslintignore
)eslint-9
: ~120 (~150eslint.config.js
- ~25 compat lines - ~5 transient disables)Validation
Broadly,
npm run lint
. Specifically,npm run lint:js
andnpm run lint:md
fromapps/site
.I also verified performance isn't worse in this PR. It's actually a little better! Using
time npm run
+lint:js
orlint:md
, ignoring Turbo caches, on an M1 Max Mac Studio...main
eslint-9
lint:js
lint:md
Related Issues
Parallel to #6991.
Check List
npm run format
to ensure the code follows the style guide.npm run test
to check if all tests are passing.npx turbo build
to check if the website builds without errors.