eslint-config-nextjs
raw JSON → 1.0.7 verified Sat May 09 auth: no javascript deprecated
ESLint and Prettier config package for Next.js apps, version 1.0.7 (last release, no longer actively maintained). Provides a set of ESLint and Prettier configurations extending Airbnb style, tailored for React, Next.js, and Node apps. Users must install via install-peerdeps due to many peer dependencies. The project has been deprecated in favor of eslint-config; no further updates. Key differentiator: all-in-one config for Next.js with VS Code optimized settings, but now unmaintained and lacking support for newer ESLint versions.
Common errors
error Cannot find module 'eslint-config-nextjs' ↓
cause Config name mismatch or package not installed.
fix
Ensure .eslintrc extends 'nextjs' (not 'next') and package is installed via install-peerdeps.
error Failed to load plugin 'import' declared in 'nextjs' ↓
cause Peer dependencies not installed.
fix
Run 'npx install-peerdeps --dev eslint-config-nextjs' to install all peer deps.
error ESLint couldn't find the config 'nextjs' ↓
cause Configuration name is wrong or package not installed.
fix
Verify correct spelling 'nextjs' in .eslintrc and that package is installed.
Warnings
deprecated Package is no longer actively maintained. Consider using https://github.com/ijsto/eslint-config instead. ↓
fix Migrate to eslint-config package.
gotcha Must use npx install-peerdeps to install peer dependencies; npm install does not install peer deps automatically. ↓
fix Run 'npx install-peerdeps --dev eslint-config-nextjs'.
gotcha Config name is 'nextjs', not 'next' or 'eslint-config-nextjs'. Using wrong name will cause ESLint to not load config. ↓
fix Use { "extends": ["nextjs"] } in .eslintrc.
gotcha If using Yarn, npx may prompt to install with Yarn. Do NOT continue with npx if you use Yarn. ↓
fix Follow the prompt to install with Yarn instead.
Install
npm install eslint-config-nextjs yarn add eslint-config-nextjs pnpm add eslint-config-nextjs Imports
- extends wrong
Using 'next' instead of 'nextjs' as the config namecorrectIn .eslintrc: { "extends": ["nextjs"] } - install-peerdeps wrong
npm install eslint-config-nextjs --save-dev (missing peer dependencies)correctnpx install-peerdeps --dev eslint-config-nextjs - scripts wrong
"lint": "eslint . --ext .js" (unnecessary extension)correct"lint": "eslint ."
Quickstart
npx install-peerdeps --dev eslint-config-nextjs
echo '{
"extends": ["nextjs"]
}' > .eslintrc
# Add to package.json scripts:
# "lint": "eslint .",
# "lint:fix": "eslint . --fix"