Replies: 1 comment 5 replies
-
Thanks for sharing these details. The first thing I notice is that the error message when the config file wasn't found isn't very helpful. We can definitely do something about that. Out of curiosity, did you follow the link that was mentioned in the error message? The goal was to get you to this section: https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config Though admittedly, that is a bit further down the page so we probably need to fix that link too. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As per discussions with @nzakas on BlueSky, I'm adding a discussion here to document the issues we are facing with upgrading to ESLint v9.
Our code base har origins from
create-react-app
, and has since moved on to use Vite.We have a
.eslintrc.json
file which looks like so:making use of the following packages:
eslint-config-prettier
,eslint-config-react-app
,@tanstack/eslint-plugin-query
.jsx-a11y
is included ineslint-config-react-app
.When naively upgrading to ESLint v9, the first error message is this:
This is expected, so I tried to make a basic
eslint.config.js
file, which looks like this:Obviously, we now have TypeScript issues (e.g.
error Parsing error: Unexpected token :
), since we need a plugin to support TS. This used to be part ofreact-app
. Naively using the package like so:gives another error
which I attribute to the fact that the package (
eslint-config-react-app
) does not yet support v9 (as per jsx-eslint/eslint-plugin-react#3699).Further down the line, similar issues are likely to arise with
@tanstack/eslint-plugin-query
(as per TanStack/query#7253).All things considered, I think we are stuck with ESLint 8 for now, unless we want to make a major revamp of our linting setup.
I think this is a somewhat common experience in the ESLint community right now, and a major reason why the v9 migration has not been very smooth.
Another thing to note is that our upgrade is driven by dependabot. Had it not been for dependabot, we may have postponed upgrading for quite some time, and not run into these issues before they were solved by the package maintainers.
Beta Was this translation helpful? Give feedback.
All reactions