Upgrade eslint to V9 and typescript-eslint v7
tianyingchun opened this issue · comments
upgrade eslint typescript to https://typescript-eslint.io/blog/announcing-typescript-eslint-v7
Thanks @tianyingchun It's actually updated, see https://github.com/belgattitude/nextjs-monorepo-example/blob/main/packages/eslint-config-bases/package.json
But be aware than it might cause issues, I'm tracking it down in an another repo belgattitude/shared-dx#539
The idea is to first allow https://github.com/vercel/next.js/blob/dd24033caf1cfcfc3f9efde925bf54132e4d322c/packages/eslint-config-next/package.json#L15C35-L15C51
we don't use typescript-eslint
package directly?
I think this will answer your question
- issue vercel/next.js#62138
- pr - vercel/next.js#62137
typescript-eslint
has dependencies
"dependencies": {
"@typescript-eslint/eslint-plugin": "7.0.1",
"@typescript-eslint/parser": "7.0.1"
},
Yes... you're well talking about this repo ?
it's on v7:
The warning I mentionned is that it will cause issues till other plugins allows it at v7 too. See above.
Would suggest to play with yarn why -R @typescript-eslint/parser
to understand the side-effects. A major must be allowed by all other plugins, otherwise the hoisting will possibly lead to eslint 'cannot ... uniquely'... this won't happens with eslint flat config, but not yet ready in the ecosystem
yes, agree :) maybe we need to wait the eslint related plugins upgrade to support V7
eslint V9 now released, will eslint-config-bases
updated ?
I’ll wait till nextjs supports it. Feel free to open a pr too. Might help to discover issues as well.
Btw the pr vercel/next.js#62137 landed in nextjs 14.2.0
To keep reference:
- Latest eslint-plugin-react-hooks partially support eslint v9 (no flat config yet) in facebook/react#28773. Released in v4.6.2. Changelog not clear enough to see if it can replace the 5-canary required by nextjs plugin (TBD)
- Nextjs eslint plugin, does not yet support v9. (keep track in nextjs issues) :
"eslint-plugin-react-hooks": "^4.5.0 || 5.0.0-canary-7118f5dd7-20230705"
in https://github.com/vercel/next.js/blob/canary/packages/eslint-config-next/package.json
waiting few month later maybe :)
https://github.com/ArnaudBarre/eslint-plugin-react-refresh
if we need to include eslint-plugin-react-refresh