fix: forward --fix to eslint in lint:fix script - #52
Merged
Conversation
jhamon
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
package.json'slint:fixscript wasnpm run lint --fix. npm parses--fixas an argument tonpm runitself (with a deprecation warning that it will hard-fail in a future npm major), not as something forwarded to the underlyingeslint srccommand. As a resultnpm run lint:fixran plaineslint srcwith no--fixat all — it behaved identically tonpm run lintand 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
Verified locally: introduced a
keyword-spacingviolation (if(true)) in a scratch file undersrc/, confirmed plainnpm run lintflagged it, then confirmednpm run lint:fixrewrote it toif (true)with nonpm warn Unknown cli configoutput. Also rannpm run lint,npm run typecheck,npm run format:check, andnpm test(23 tests) against the real change — all green.Closes #45
Note
Low Risk
Single npm script string change with no runtime, security, or data impact.
Overview
Fixes
lint:fixso ESLint actually receives--fix. The script wasnpm run lint --fix, which npm treats as its own CLI flag (with a deprecation warning) instead of passing--fixtoeslint src. It therefore ran the same asnpm run lintand never auto-fixed anything.The script is now
npm run lint -- --fix, which forwards--fixto the underlyingeslint srccommand. No changes tolint, formatting, or ESLint config.Reviewed by Cursor Bugbot for commit ec81cb2. Bugbot is set up for automated code reviews on this repo. Configure here.