-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
next-lint Doesn't Support ESLint 9 #64409
Comments
Bumping this for visibility, it does not seem to prevent build but unsure of the impact.
|
Bumping this, it is breaking package update automation at my corp |
Yeah it's breaking change because ESLint 9.0.0 is a major release with a ton of breaking changes. You better hope NextJS didn't adhoc around every single ESLint implementation detail, so the migration to the newest version wouldn't take forever on their end. |
IMHO, the adoption should be done gradually in the following steps:
|
I would like to add that the new flat config file can have multiple names:
Source: https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file |
Not a fix but you can ignore eslint during build like so: // next.config.js
module.exports = {
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
} This way you have manual control over eslint, you can run a custom linting config before build. |
I went back to version |
Same error .eslintrc.json : I updated all the packages to the latest version but this still does not solve the problem I don’t want to go back to the old version to fix it. If anyone knows how to solve the problem without going to the old version, please help me 🙏 |
The only package update of relevance is |
Same issue here, I thought I was crazy. Downgrade to an old version for now... 🤖 😸
|
having the same problem here, I have a custom-shared lint config and my latest PR when linked locally to test it it fails, sebalaini/sebalaini-lints-config#6 |
This comment was marked as spam.
This comment was marked as spam.
ESLint v8 is now official EOL as of today: I skimmed through this thread and it seems like the only workaround identified was to downgrade to v8, so with this change, Next is now shipping with unsupported packages. Hopefully Vercel can dedicate some folks on this. To me, it seems like a pretty bad look to have a Next package script just not work OOTB. Vercel is an actual company, not a scrappy startup or a loose group of volunteers, so IMO they should find it easier to get some hands on this. |
If they do end up mucking about with eslint 9 support, perhaps they could simultaneously separate doctoring logic from |
Just pointing out that the PRs listed in #64409 (comment) are merged. As best I can tell, ESLint 9 support is no longer blocked by downstream dependencies. |
Also would like to check in on ESLint 9 support now that it's no longer blocked by downstream dependencies. |
@TomasHubelbauer, downgrading to v8 isn't the only workaround. See #64409 (comment) Do agree with the sentiment that this needs some more attention. |
I've been using eslint v9 and next rules for a while now with #64409 (comment). |
@jamiter From the moment the ESLint team started the tracking threads below, someone from Vercel should've had a team looking into which dependencies are in use, what they might be able to do help get them upgraded on time (or even earlier), and an idea of how bad things might look if they ended up still shipping with v8 after it was EOL. But here we are. |
I was able to upgrade to ESLint v9 after adding this workaround to '@next/next/no-duplicate-head': 'off', // https://github.com/vercel/next.js/issues/64409#issuecomment-2343832704
'@next/next/no-page-custom-font': 'off', // https://github.com/vercel/next.js/issues/64409 I also bumped "pnpm": {
"overrides": {
"eslint-plugin-react-hooks": "npm:eslint-plugin-react-hooks@5.1.0-rc-1460d67c-20241003"
}
} If you are using Yarn/NPM, the syntax may be a bit different but the idea would be the same. The I haven’t upgraded to FlagConfig yet, this is not a blocker. To use old config with ESLint v9, you can add "fix:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint --max-warnings=0 --fix \"**/*\"",
"...": "...",
"lint:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint --max-warnings=0 \"**/*\"", If you use VS Code (Cursor etc.), you need to also add |
For anyone hitting here, I also wanted to have tslint support, so the flat-packed Packages
eslint.config.mjs
|
eslint 8 is officially deprecated already :S |
What is the timeline for Eslint 9 support feature? When is NextJS planning to ship it? Do you guys need help? |
My guess is that Vercel is working hard to release Next 15, as the Next.js conference is just around the corner. Perhaps they'll then advice to update to Next 15, which I assume will support eslint 9. |
@samcx mentions Next 15 in this thread ☝️ but to say that it'll be shipping without ESLint 9. Whether that'll be quick enough to turn around now that all of the plugins that were holding things up are good to go, who knows. |
Adding more context, also need changing is the eslint
|
It looks like Vercel has underestimated ESLint. I think a dedicated team is needed for the migration as soon as possible. ESLint 8 has been deprecated for a week now, and all projects will start migrating to ESLint v9. |
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/vigilant-pine-6wmz8y
To Reproduce
next lint
script to package.json per https://nextjs.org/docs/app/building-your-application/configuring/eslint.eslintrc.json
to project per https://nextjs.org/docs/app/building-your-application/configuring/eslintCurrent vs. Expected behavior
Expected lint to run successfully, but it failed with errors.
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Available memory (MB): 4102 Available CPU cores: 2 Binaries: Node: 20.9.0 npm: 9.8.1 Yarn: 1.22.19 pnpm: 8.10.2 Relevant Packages: next: 14.2.1-canary.0 // Latest available version is detected (14.2.1-canary.0). eslint-config-next: 14.1.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
ESLint (eslint-config-next)
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local)
Additional context
It looks like this is coming from https://github.com/vercel/next.js/blob/canary/packages/next/src/cli/next-lint.ts. This needs to be changed to support ESLint 9's flat config https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-config. The migration guide is at https://eslint.org/docs/latest/use/configure/migration-guide
NEXT-3112
The text was updated successfully, but these errors were encountered: