Skip to content

npm run lint is unrunnable: script is eslint src/ but eslint is not a devDependency #65

Description

@yakimoto

Symptom

npm run lint in this repo is unrunnable. The script is defined as eslint src/, but eslint is
not a devDependency
and there is no eslint config. Every invocation dies before it lints anything:

$ npm run lint
sh: eslint: command not found
# exit 127

The repo therefore advertises a lint gate it does not have. Anyone (human or agent) who runs the
documented command gets a shell error, not a lint result — and any workflow that shelled out to it
was failing for a reason unrelated to code quality.

Repro / Evidence

The dangerous residue is that the script and its README/workflow references still exist, so the
repo looks linted. Absence is being rendered as health.

The right shape of fix

Pick one and make it true end to end — do not leave a third state where the script exists but no
gate runs it:

(A) Make it real. Add eslint (+ the parser/config the repo actually needs, e.g.
typescript-eslint for src/) as devDependencies, commit a config, fix or explicitly baseline the
findings, and wire the Lint step back into CI so npm run lint is a gate that can go red.

(B) Remove it. Delete the lint script from package.json, and remove every README and
workflow reference to it, so nothing claims a lint gate exists.

(A) is preferred; (B) is acceptable and honest. Silently leaving it broken is neither.

Done-check

  • npm ci && npm run lint exits 0 in CI on a clean checkout, and the Lint step is present and
    required in the release/verify workflow — or
  • npm run lint no longer exists, and grep -rn "npm run lint\|run: .*lint" README.md .github/ in
    this repo returns no references to it.
  • Either way: no workflow contains a lint step that was removed to work around exit 127.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions