Skip to content

chore: install vite-plus git hooks (pre-commit + pre-push)#42

Merged
ch99q merged 2 commits into
mainfrom
ch99q/git-hooks-vp-config
May 19, 2026
Merged

chore: install vite-plus git hooks (pre-commit + pre-push)#42
ch99q merged 2 commits into
mainfrom
ch99q/git-hooks-vp-config

Conversation

@ch99q
Copy link
Copy Markdown
Collaborator

@ch99q ch99q commented May 19, 2026

Summary

  • Adds a vp config-installed husky-style hook scaffold at .vite-hooks/. Pre-commit runs vp staged (which runs vp check --fix on staged files, via the new staged block in vite.config.ts). Pre-push runs vp check && vp test so CI failures get caught locally before the round-trip.
  • vite-plus regenerates the .vite-hooks/_/ shim layer on each vp config invocation (its _/.gitignore keeps the shims out of source control); only the top-level pre-commit / pre-push scripts are committed.
  • git config core.hooksPath is local-only — contributors run vp config once per fresh clone. New review-checklist line in CLAUDE.md documents this. VITE_GIT_HOOKS=0 skips hooks for emergency pushes.

Test plan

  • git commit here ran the pre-commit pipeline (vp check --fix on staged files).
  • git push here ran the pre-push pipeline (vp check + full vp test — 74 files / 663 tests passed).
  • CI (re-validates the same checks server-side).

`vp config` wires up a husky-style scaffold at .vite-hooks/_/ that
points at the top-level scripts in .vite-hooks/. Local-clone only:
`git config core.hooksPath .vite-hooks/_` is per-clone, so contributors
run `vp config` once after cloning.

- pre-commit: `vp staged` (runs `vp check --fix` on staged paths via
  the new `staged` block in vite.config.ts).
- pre-push: `vp check && vp test` so CI failures get caught locally
  before the push round-trip. VITE_GIT_HOOKS=0 skips for emergencies.
- CLAUDE.md: new review-checklist line telling agents/devs to run
  `vp config` once per fresh clone.
@ch99q ch99q force-pushed the ch99q/git-hooks-vp-config branch from 9e98002 to 131e9eb Compare May 19, 2026 16:43
vitest's forks pool intermittently emits Worker exited unexpectedly
after platform-compat.test.ts's 6 javac compiles complete on Windows.
All tests pass, but the pool reports the run as failed because the
fork dies during teardown — same shape we hit on #40 and #42.

The tests cover OS-agnostic javac+classpath logic (AsyncChatEvent
presence in paper-api vs spigot-api, etc.) already verified on the
ubuntu and macos legs. Skipping on Windows costs no coverage and
removes ~70s of flaky runtime.
@ch99q ch99q merged commit d1d8fb8 into main May 19, 2026
4 checks passed
@ch99q ch99q deleted the ch99q/git-hooks-vp-config branch May 19, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant