-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
ESLint 9 upgrade #10731
Comments
OK eslint-plugin-icedfrisby is not going to be a blocker chris48s/eslint-plugin-icedfrisby#121 |
Having spent a bit of time on this, the situation is not too bad. Most of the plugins we use do have a version that supports flat config and either we're already using it or we can upgrade to it. The exceptions are:
issues:
The recommendation seems to be to migrate to https://github.com/neostandard/neostandard for those 3 eslint-plugin-no-extension-in-require is not compatible but also now that we've almost completely switched to ESM we can just get rid of this with basically no impact. We have so few eslint-plugin-react-hooks does have a compatible release but also there is a really long issue about it facebook/react#28313 which makes me think this one might be a case where its a bit more complicated than that we'll have to see. ..and then we've got eslint-plugin-node which I think is not compatible. But also having looked at out eslintrc, it doesn't look like we are actually using any of the rules or configs from it. I think this was something we were using in the past but are not any more so I think we could just ditch this one with no impact. So although there are some bits of the jigsaw that need putting together, I don't think there is anything which represents a hard blocker there 🤞 |
Are there any other ones we could ditch? Our eslint config has always felt very complex and obscure to me, I'd be all for simplification... :) |
I'm currently knee-deep in an I agree that our eslint setup is pretty fiendish. I think there are several things going on here:
So I think there are probably some opportunities to do a bit of cleanup and I will try and do this as part of the process, but I think on the whole we are probably still going to end up with quite a complicated config and a lot of that is just for valid reasons. |
📋 Description
This project currently uses ESLint 8.
ESLint 9 makes a big breaking change requiring the move to flat config.
For a simple project, this migration is not a huge deal. For example, I migrated most of my projects to ESLint 9 a while back. Here's a couple of examples of what the commits migrating the config looked like:
Shields is a bit more of a complicated beast though, for two reasons:
We are now starting to see some ESLint plugins we use which now require ESLint 9. For example eslint-plugin-cypress requires ESLint 9. We're also starting to see unresolvable peerDependency conflicts with some NPM plugins.
I think the first step is to go through this list of all the eslint- packages we rely on, work out which ones do/don't have compatibility with flat config and see what the gaps are:
Then we can work out how many blockers we have. I don't really have a vibe for how big the gap is yet.
Annoyingly, I already know about one of the problem children here. eslint-plugin-icedfrisby does not yet have a release which is compatible with flat config, and it is maintained by.. me 😄 I've been ignoring it due to bmish/eslint-doc-generator#526 but it is probably time for me to at least revisit the topic on that repo.
The text was updated successfully, but these errors were encountered: