Skip to content

fix: forward --fix to eslint in lint:fix script - #52

Merged
jhamon merged 1 commit into
mainfrom
agent/maintenance/issue-45-a2cb647fd30b9a22
Aug 7, 2026
Merged

fix: forward --fix to eslint in lint:fix script#52
jhamon merged 1 commit into
mainfrom
agent/maintenance/issue-45-a2cb647fd30b9a22

Conversation

@pinecone-groundskeeper

@pinecone-groundskeeper pinecone-groundskeeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Problem

package.json's lint:fix script was npm run lint --fix. npm parses --fix as an argument to npm run itself (with a deprecation warning that it will hard-fail in a future npm major), not as something forwarded to the underlying eslint src command. As a result npm run lint:fix ran plain eslint src with no --fix at all — it behaved identically to npm run lint and never fixed anything.

Solution

Add the -- separator so npm forwards the flag to the script: npm run lint -- --fix. This is the only change — lint, format, and eslint config are untouched.

Before/after

# before
$ npm run lint:fix
npm warn Unknown cli config "--fix". This will stop working in the next major version of npm.
> eslint src          # no --fix, nothing changes

# after
$ npm run lint:fix
> eslint src --fix    # actually rewrites auto-fixable violations, no npm warning

Verified locally: introduced a keyword-spacing violation (if(true)) in a scratch file under src/, confirmed plain npm run lint flagged it, then confirmed npm run lint:fix rewrote it to if (true) with no npm warn Unknown cli config output. Also ran npm run lint, npm run typecheck, npm run format:check, and npm test (23 tests) against the real change — all green.

Closes #45

Generated by GitHub Maintenance Fixer · sonnet50 · 68 AIC · ⌖ 8.71 AIC · ⊞ 9.4K ·


Note

Low Risk
Single npm script string change with no runtime, security, or data impact.

Overview
Fixes lint:fix so ESLint actually receives --fix. The script was npm run lint --fix, which npm treats as its own CLI flag (with a deprecation warning) instead of passing --fix to eslint src. It therefore ran the same as npm run lint and never auto-fixed anything.

The script is now npm run lint -- --fix, which forwards --fix to the underlying eslint src command. No changes to lint, formatting, or ESLint config.

Reviewed by Cursor Bugbot for commit ec81cb2. Bugbot is set up for automated code reviews on this repo. Configure here.

@pinecone-groundskeeper
pinecone-groundskeeper Bot requested review from a team as code owners August 7, 2026 12:19
@pinecone-groundskeeper pinecone-groundskeeper Bot added the agent:maintenance Opened/maintained by the maintenance agent; it recognizes its own work by this label label Aug 7, 2026
@jhamon
jhamon merged commit 21bdfcb into main Aug 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:maintenance Opened/maintained by the maintenance agent; it recognizes its own work by this label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm run lint:fix doesn't actually pass --fix to eslint

1 participant