ESLint configuration package published by Vercel as part of Next.js, providing a curated set of rules for Next.js projects. Current stable version is 16.2.4, with canary releases in parallel. It integrates with the Next.js compiler, includes TypeScript and React-specific rules, and is updated frequently alongside Next.js releases. Enforces best practices for App Router, Pages Router, image optimization, and data fetching. Requires eslint >=9.0.0 and typescript >=3.3.1 as peer dependencies. Differentiators include automatic detection of Next.js configuration and seamless integration with Next.js toolchain.
npm install eslint-config-nextVerified import paths — ran on the pinned version, not inferred.
Shows how to use eslint-config-next with flat config in an eslint.config.mjs file, including core-web-vitals preset.
Migrate to flat config (eslint.config.js or mjs).
Update eslint to >=9.0.0.
Remove /parser import; import default config.
npm install typescript --save-dev
Override specific rules in your config.
Switch to flat config: use `import nextCoreWebVitals from 'eslint-config-next/core-web-vitals'`.
Create eslint.config.mjs or eslint.config.js with flat config.
npm install typescript --save-dev
Ensure tsconfig.json exists and is valid, or set project: null in config.