Skip to content

[Chore] pre-push hook runs lint:fix, mutating the tree and shipping unfixed commits #402

Description

@johnleider

Summary

The pre-push hook runs pnpm lint:fix. eslint --fix exits 0 after auto-fixing, so the push proceeds while the fixes land as unstaged working-tree edits — the already-committed unfixed code is pushed, and CI's check-only lint then fails on a commit that "passed" locally.

Location

  • package.json:46-47"simple-git-hooks": { "pre-push": "pnpm lint:fix && pnpm typecheck && pnpm test:run && pnpm repo:check" } (mirrored in .git/hooks/pre-push).
  • CI runs check-only pnpm lint (.github/workflows/pr-checks.yml), so the two diverge.

Impact

Contributor DX only (no consumer or attacker surface), but real and recurring: a green local push can produce red CI plus a surprise dirty working tree.

Suggested fix

Change the pre-push command from pnpm lint:fix to check-only pnpm lint so local pre-push mirrors CI exactly — a lint error blocks the push loudly instead of silently rewriting the tree. Prefer this over moving a blanket lint:fix to pre-commit (a full-repo fix on every commit is heavy); if a pre-commit fix is wanted, scope it with lint-staged.

Metadata

Metadata

Assignees

Labels

T: bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions