-
Notifications
You must be signed in to change notification settings - Fork 2.1k
chore(eslint-config): upgrade config to use ESLint v9 & FlatConfig #7310
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
Conversation
🦋 Changeset detectedLatest commit: 6b4f0ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| ecma({ | ||
| files: "**/*.{js,jsx,ts,tsx}", | ||
| // Enabling extra rules, for stricter checking, enabled by default | ||
| isStrict: true, | ||
| // Enabling eslint-plugin-import, enabled by default | ||
| withImport: true, | ||
| }), | ||
| typescript({ | ||
| files: "**/*.{ts,tsx}", | ||
| isStrict: true, | ||
| withImport: true, | ||
| }), | ||
| style({ | ||
| files: "**/*.{js,jsx,ts,tsx}" | ||
| }) | ||
| ]; |
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.
Nitpick: I'd write down somewhere here that there are sensible defaults set and none of those need to be specified explicitly. (and maybe write down what the defaults are 🤷 )
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.
Ok, README.md updated, pls take a look ;)
I think you meant ESLint v8, right? |
FRSgit
left a comment
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.
I think we can do a bit more in the docs, but other than that - great work!
|


FlatConfigfor a more modern and flexible configuration approach.ecma,typescript,nextjs,playwright,style,architecture) is a factory for ESLint configurations, which can be used individually or together in projects.I've added the
resolutionsfield to the rootpackage.jsonto allow local linting in this repo, due to its using the ESLint v8 and Prettier v2. The package itself is linted & formatted using itself.