Registry / testing / eslint-config-nextjs

eslint-config-nextjs

JSON →
library1.0.7jsnpmunverified

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.

npm install eslint-config-nextjs
INSTALL
IMPORT
SIG · ESLINT-CONFIG-NEXT
E
eslint-config-nextjs
testingjavascriptv1.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

extends
In .eslintrc: { "extends": ["nextjs"] }
Using 'next' instead of 'nextjs' as the config name
Config name is 'nextjs', not 'next' or 'eslint-config-nextjs'.
install-peerdeps
npx install-peerdeps --dev eslint-config-nextjs
npm install eslint-config-nextjs --save-dev (missing peer dependencies)
Must use install-peerdeps to automatically install all peer dependencies.
scripts
"lint": "eslint ."
"lint": "eslint . --ext .js" (unnecessary extension)
ESLint automatically lints .js, .jsx, .ts, .tsx by default.

Installs all peer dependencies via install-peerdeps and creates a minimal .eslintrc file extending the 'nextjs' config.

npx install-peerdeps --dev eslint-config-nextjs echo '{ "extends": ["nextjs"] }' > .eslintrc # Add to package.json scripts: # "lint": "eslint .", # "lint:fix": "eslint . --fix"
Debug
Known issues
deprecatedPackage is no longer actively maintained. Consider using https://github.com/ijsto/eslint-config instead.
fix
Migrate to eslint-config package.
affects: >=1.0.0
gotchaMust 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'.
affects: >=1.0.0
gotchaConfig 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.
affects: >=1.0.0
gotchaIf 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.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'eslint-config-nextjs'
Config name mismatch or package not installed.
fix
Ensure .eslintrc extends 'nextjs' (not 'next') and package is installed via install-peerdeps.
Failed to load plugin 'import' declared in 'nextjs'
Peer dependencies not installed.
fix
Run 'npx install-peerdeps --dev eslint-config-nextjs' to install all peer deps.
ESLint couldn't find the config 'nextjs'
Configuration name is wrong or package not installed.
fix
Verify correct spelling 'nextjs' in .eslintrc and that package is installed.
Upgrade
Version history
1.0.7latest on npm
Audit
Dependencies
babel-eslintrequiredRequired for linting experimental JavaScript features
eslintrequiredCore linting tool
eslint-config-airbnbrequiredBase ESLint rules
eslint-config-prettierrequiredDisables ESLint rules that conflict with Prettier
eslint-plugin-htmlrequiredLints HTML files
eslint-plugin-importrequiredESLint plugin for import/export syntax
eslint-plugin-jsx-a11yrequiredAccessibility linting for JSX
eslint-plugin-prettierrequiredRuns Prettier as an ESLint rule
eslint-plugin-reactrequiredReact-specific linting rules
eslint-plugin-react-hooksrequiredLint for React Hooks rules
prettierrequiredCode formatter
Agent activity
7 hits · last 30 days
node
6
Resources
eslint-config-nextjs — npm install eslint-config-nextjs · libregistry