Skip to content

[FEATURE] Migrate next lint to ESLint CLI #5012

@KariraLakshya

Description

@KariraLakshya

Why do we need this improvement?

We need this because the next lint command is officially deprecated and scheduled for removal in Next.js 16. Currently, running npm run lint outputs the following warning:

"next lint is deprecated and will be removed in Next.js 16. For existing projects, migrate to the ESLint CLI."

If we do not address this now, our CI/CD pipelines and local linting scripts will break when we eventually upgrade to Next.js 16.

How will this change help?

This change will:

  • Future-proof the repository: It ensures smooth compatibility with future Next.js versions (v16+).

  • Clean up build logs: It removes the noisy deprecation warnings from our CI checks and local development terminals.

  • Standardize Tooling: Migrating to the native ESLint CLI aligns the project with standard ecosystem practices, decoupling the linter from the Next.js specific wrapper.

Screenshots

No response

How could it be implemented/designed?

We can implement this using the official Next.js codemod. The plan is:

  • Run the automated migration tool:
npx @next/codemod@canary next-lint-to-eslint-cli
  • Update package.json: Ensure the lint script is updated from next lint to eslint.

  • Verification: Run npm run lint to confirm that the output is clean and rules are still being applied correctly.

🚧 Breaking changes

Yes

👀 Have you checked for similar open issues?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions