Skip to content

next lint is deprecated (removed in Next.js 16) — migrate the lint step to the ESLint CLI #133

@ipapakonstantinou

Description

@ipapakonstantinou

Summary

npm run lint (which runs next lint) prints a deprecation notice:

`next lint` is deprecated and will be removed in Next.js 16.
For new projects, use create-next-app to choose your preferred linter.
For existing projects, migrate to the ESLint CLI:
npx @next/codemod@canary next-lint-to-eslint-cli .

Linting currently passes (✔ No ESLint warnings or errors), so this is maintenance, not a break — yet. When the project bumps to Next.js 16 the lint script (and therefore the Lint step in .github/workflows/ci.yml) will stop working.

Suggested fix

Run the official codemod and update the lint/lint:fix scripts in package.json to call eslint directly:

npx @next/codemod@canary next-lint-to-eslint-cli .

Then verify npm run lint, npm run typecheck, npm test, and npm run build still pass, and confirm the CI Lint step is green.

Context

  • package.json: "lint": "next lint"
  • .github/workflows/ci.yml: the Lint step runs npm run lint
  • Currently on eslint ^9 + eslint-config-next ^15.5.18

https://claude.ai/code/session_01Rf9F7stxAk2WxNavwsH4Ku

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions