-
SummaryEslint has introduced a new config files system called As per the documentation:
I migrated my config to the flat system but nextjs doesn't picked it up when calling next lint. From // Find user's .eslintrc file
// See: https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-file-formats
const eslintrcFile =
(await findUp(
[
'.eslintrc.js',
'.eslintrc.cjs',
'.eslintrc.yaml',
'.eslintrc.yml',
'.eslintrc.json',
'.eslintrc',
],
{
cwd: baseDir,
}
)) ?? null Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 9 replies
-
Any update on this? The flat config will be the de facto standard but I can't make it work when running next lint. Saw a PR (#56181) but doesn't seem to be active... |
Beta Was this translation helpful? Give feedback.
-
ESLint 9 is now out and it's not compatible with
If you get these errors, downgrade to ESLint 8. |
Beta Was this translation helpful? Give feedback.
-
As a temporary solution you can skip eslint on build via config and run it manually. You have to reconfigure all the plugins to use flat config tho. |
Beta Was this translation helpful? Give feedback.
-
imho it should be updated in next 14 |
Beta Was this translation helpful? Give feedback.
-
downgrade is not a solution |
Beta Was this translation helpful? Give feedback.
-
This will not make Next.js pickup your config file, but I wrote a guide on how to migrate to ESLint 9 until Next.js supports it : Eslint 9 & Next.js — Setup Guide Also for a TLDR; check my comment here |
Beta Was this translation helpful? Give feedback.
-
ESLint 9 is supported as of the Next.js 15 RC 2. v15 stable release coming soon 🙏 |
Beta Was this translation helpful? Give feedback.
-
Same for me. The reference to @rushstack/eslint-patch is coming from: node_modules/eslint-config-next/index.js. It contains require('@rushstack/eslint-patch/modern-module-resolution') which is creating an issue for eslint 9 to run. So the twitter post supporting eslint 9 is not correct I feel @leerob |
Beta Was this translation helpful? Give feedback.
ESLint 9 is supported as of the Next.js 15 RC 2. v15 stable release coming soon 🙏
https://x.com/nextjs/status/1846276572812124565