Skip to content

yarn lint has never been able to run: 'next lint' was removed in Next.js 16 and there is no eslint config #179

Description

@pat-lewczuk

yarn lint cannot succeed in this repo, and has not been able to for some time. It is listed in
.ai/agentic.config.json as one of five validation.commands, so every agent run and every
contributor following the documented gate hits it.

What happens

$ yarn lint
Invalid project directory provided, no such directory: <repo>/lint

Two independent causes:

  1. package.json has "lint": "next lint". next lint was removed in Next.js 16 (this repo is
    on 16.1.5). The next CLI now reads lint as a positional directory argument, which is where the
    nonsense error comes from.
  2. There is no eslint configuration anywhere in the repo — no eslint.config.*, no .eslintrc*.
    So even after fixing the script there is nothing to run.

eslint@^9 and eslint-config-next@16.0.7 are both already in devDependencies, so the dependencies
are present; only the wiring is missing.

Expected

  • Add a flat eslint.config.mjs extending eslint-config-next (the Next.js 16 migration path for
    projects that used next lint).
  • Change the script to eslint . (or eslint src).
  • Expect a first run to surface a backlog of pre-existing violations. Those should be triaged
    separately — landing the config and landing a clean tree are two different changes, and bundling
    them makes both unreviewable.

Why this is filed rather than fixed

Every bug-fix PR in the current batch records yarn lint as a pre-existing failure and moves on,
which is the right call for a bug fix but means nobody ever owns the repair. Repairing it touches the
gate every other change is measured against, so it deserves its own PR and its own review.

Related: jest.config.cjs was missing for the same kind of reason and was fixed in #135 — this is the
lint half of that story.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions