You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Report: ESLint Configuration Issues with Next.js and ESLint v9
Summary:
Following the Next.js documentation for ESLint setup leads to multiple configuration errors, particularly when using ESLint v9 and the new flat config format.
Issues Encountered:
Initial setup following Next.js docs resulted in parsing errors with JSX
Upgrading to ESLint v9 (as v8 is deprecated) caused additional issues
Using flat config format led to "context.getAncestors is not a function" error
The "@next/next/no-duplicate-head" rule fails to function properly
Solution Implementation:
The only working solution was to:
Downgrade to ESLint v8.56.0
Remove flat config implementation
Use basic .eslintrc.json with only "extends": "next/core-web-vitals"
Suggested Improvements:
Update Next.js documentation to address ESLint v9 compatibility
Provide clear guidance on flat config vs traditional config usage
Test and ensure compatibility with latest ESLint versions
Update ESLint plugins to support newer versions
Is there any context that might help us understand?
Environment:
Next.js (latest)
Node.js (latest)
Initially attempted with ESLint v9
Finally working with ESLint v8.56.0
Does the docs page already exist? Please link to it.
I had the same problem and I have managed to fix this issue by installing @eslint/js and @eslint/eslintrc but for my life that I'm not able to find again the post where it was suggested 😄.
What is the documentation issue?
Bug Report: ESLint Configuration Issues with Next.js and ESLint v9
Summary:
Following the Next.js documentation for ESLint setup leads to multiple configuration errors, particularly when using ESLint v9 and the new flat config format.
Issues Encountered:
Solution Implementation:
The only working solution was to:
Suggested Improvements:
Is there any context that might help us understand?
Environment:
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/getting-started/installation
The text was updated successfully, but these errors were encountered: