{"id":19548,"library":"eslint-config-next","title":"eslint-config-next","description":"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.","status":"active","version":"16.2.4","language":"javascript","source_language":"en","source_url":"https://github.com/vercel/next.js","tags":["javascript"],"install":[{"cmd":"npm install eslint-config-next","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-next","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-next","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; config requires eslint >=9.0.0 to function","package":"eslint","optional":true},{"reason":"peer dependency; required for TypeScript rule support if used","package":"typescript","optional":true}],"imports":[{"note":"ESM-only since v16. Use import syntax with flat config.","wrong":"const nextEslintConfig = require('eslint-config-next')","symbol":"default","correct":"import nextEslintConfig from 'eslint-config-next'"},{"note":"ESM-only; use import for flat config.","wrong":"const nextCoreWebVitals = require('eslint-config-next/core-web-vitals')","symbol":"next/core-web-vitals","correct":"import nextCoreWebVitals from 'eslint-config-next/core-web-vitals'"},{"note":"ESM-only; standalone TypeScript config for flat config.","wrong":null,"symbol":"next/typescript","correct":"import nextTypescript from 'eslint-config-next/typescript'"}],"quickstart":{"code":"// eslint.config.mjs\nimport nextConfig from 'eslint-config-next';\nimport nextCoreWebVitals from 'eslint-config-next/core-web-vitals';\n\nexport default [\n  nextConfig,\n  nextCoreWebVitals,\n  {\n    rules: {\n      // your custom rules\n    }\n  }\n];\n","lang":"javascript","description":"Shows how to use eslint-config-next with flat config in an eslint.config.mjs file, including core-web-vitals preset."},"warnings":[{"fix":"Migrate to flat config (eslint.config.js or mjs).","message":"eslint-config-next v16 drops support for legacy eslintrc format. Flat config only.","severity":"breaking","affected_versions":">=16.0.0"},{"fix":"Update eslint to >=9.0.0.","message":"Minimum eslint peer dependency increased to 9.0.0 in v16.","severity":"breaking","affected_versions":">=16.0.0"},{"fix":"Remove /parser import; import default config.","message":"Import from 'eslint-config-next/parser' is deprecated; use 'next' config directly.","severity":"deprecated","affected_versions":">=16.0.0"},{"fix":"npm install typescript --save-dev","message":"If using TypeScript, you must install typescript as a peer dependency even if not using TypeScript yourself.","severity":"gotcha","affected_versions":"all"},{"fix":"Override specific rules in your config.","message":"Rules may conflict with other ESLint plugins like eslint-plugin-react or eslint-plugin-import. Disable conflicting rules.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'16.2.4':28 '3.3.1':72 '9.0.0':69 'alongsid':51 'app':58 'automat':78 'best':55 'canari':30 'compil':39 'config':3 'configur':6,82 'curat':17 'current':24 'data':65 'depend':75 'detect':79 'differenti':76 'enforc':54 'eslint':2,5,68 'eslint-config-next':1 'fetch':66 'frequent':50 'imag':62 'includ':40,77 'integr':35,85 'javascript':89 'next':4 'next.js':14,22,38,52,81,87 'optim':63 'packag':7 'page':60 'parallel':33 'part':12 'peer':74 'practic':56 'project':23 'provid':15 'publish':8 'react':44 'react-specif':43 'releas':31,53 'requir':67 'router':59,61 'rule':20,46 'seamless':84 'set':18 'specif':45 'stabl':25 'toolchain':88 'typescript':41,71 'updat':49 'vercel':10 'version':26","created_at":"2026-04-25T11:18:22.577591+00:00","updated_at":"2026-04-25T11:18:22.577591+00:00","problems":[{"fix":"Switch to flat config: use `import nextCoreWebVitals from 'eslint-config-next/core-web-vitals'`.","cause":"Using legacy eslintrc format; v16 only supports flat config.","error":"Error: Failed to load config \"next/core-web-vitals\" to extend from."},{"fix":"Create eslint.config.mjs or eslint.config.js with flat config.","cause":"eslint-config-next v16 requires flat config.","error":"Error: ESLint configuration in eslintrc format is not supported."},{"fix":"npm install typescript --save-dev","cause":"Missing peer dependency typescript.","error":"Cannot find module 'typescript'"},{"fix":"Ensure tsconfig.json exists and is valid, or set project: null in config.","cause":"TypeScript project not configured or tsconfig.json missing.","error":"Parsing error: Cannot read file 'tsconfig.json'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://nextjs.org","github":"https://github.com/vercel/next.js","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-config-next","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}