Registry / web-framework / eslint-config-next

eslint-config-next

JSON →
library16.2.4jsnpmunverified

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.

web-frameworktesting
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ESM-only since v16. Use import syntax with flat config.

import nextEslintConfig from 'eslint-config-next'

ESM-only; use import for flat config.

import nextCoreWebVitals from 'eslint-config-next/core-web-vitals'

ESM-only; standalone TypeScript config for flat config.

import nextTypescript from 'eslint-config-next/typescript'

Shows how to use eslint-config-next with flat config in an eslint.config.mjs file, including core-web-vitals preset.

// eslint.config.mjs import nextConfig from 'eslint-config-next'; import nextCoreWebVitals from 'eslint-config-next/core-web-vitals'; export default [ nextConfig, nextCoreWebVitals, { rules: { // your custom rules } } ];
Debug
Known footguns
breakingeslint-config-next v16 drops support for legacy eslintrc format. Flat config only.
breakingMinimum eslint peer dependency increased to 9.0.0 in v16.
deprecatedImport from 'eslint-config-next/parser' is deprecated; use 'next' config directly.
gotchaIf using TypeScript, you must install typescript as a peer dependency even if not using TypeScript yourself.
gotchaRules may conflict with other ESLint plugins like eslint-plugin-react or eslint-plugin-import. Disable conflicting rules.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
12 hits · last 30 days
gptbot
4
ahrefsbot
4
chatgpt-user
3
script
1
Resources