Skip to content
You are viewing the v1 archive. For current setup guidance, use the v3 docs; the v2 release is preserved at /v2/.

Next.js

Package: @santi020k/eslint-config-next

Use the Next.js package for applications that need Next-specific linting while keeping React explicit in the final config.

pnpm
pnpm add -D @santi020k/eslint-config-next @santi020k/eslint-config-react
npm
npm install -D @santi020k/eslint-config-next @santi020k/eslint-config-react
yarn
yarn add -D @santi020k/eslint-config-next @santi020k/eslint-config-react
bun
bun add -d @santi020k/eslint-config-next @santi020k/eslint-config-react

Next.js is explicit and requires the React package too.

import { eslintConfig, NextMode } from '@santi020k/eslint-config-basic'
import next from '@santi020k/eslint-config-next'
import react from '@santi020k/eslint-config-react'
export default eslintConfig({
frameworks: {
next,
react
},
nextMode: NextMode.AppRouter,
typescript: true
})
  • Next.js-specific rules as a dedicated framework package.
  • An explicit React dependency for clearer composition and safer contracts.
  • NextMode.AppRouter support for App Router projects. This is auto-detected if an app/ or src/app/ directory is present.
  • Use NextMode.AppRouter when the app is built around the App Router and you want the corresponding override for @next/next/no-html-link-for-pages.
  • The CLI will include both React and Next imports when it detects a Next.js project.

Did this page help?

One click helps us spot documentation that needs another pass. No personal data is sent.