Skip to content

chore: replace husky with vp git hooks - #1001

Merged
fengmk2 merged 2 commits into
voidzero-dev:mainfrom
Arthie:chore--migrate-from-Husky-to-vp-config-for-git-hooks
Aug 14, 2026
Merged

chore: replace husky with vp git hooks#1001
fengmk2 merged 2 commits into
voidzero-dev:mainfrom
Arthie:chore--migrate-from-Husky-to-vp-config-for-git-hooks

Conversation

@Arthie

@Arthie Arthie commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Replace husky and lint-staged with the built-in Vite+ hooks, so this repo dogfoods vp config and vp staged.

  • .vite-hooks/pre-commit runs vp staged
  • The lint-staged rules move to the staged block in vite.config.ts
  • prepare runs vp config instead of husky
  • Remove husky and lint-staged from the root package.json and husky from the catalog (packages/cli keeps lint-staged, it implements vp staged)

Hooks stay opt-in: the repo sets ignoreScripts: true, so prepare does not run on pnpm install. To activate, run vp config after pnpm build. If a clone activated husky before, run git config --unset core.hooksPath once first.

Earlier revisions also committed vp config agent files (.claude/settings.json, a skills symlink, a CLAUDE.md block). The rebase dropped them: vp mcp and the shipped skills directory no longer exist, and repo guidance now lives in AGENTS.md.

@netlify

netlify Bot commented Mar 17, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 0145dec
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a7eb8647cba370008c091cb

Comment thread pnpm-workspace.yaml

@fengmk2 fengmk2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Arthie Thanks, I will merge after doing local verification with no issues.

@Arthie
Arthie force-pushed the chore--migrate-from-Husky-to-vp-config-for-git-hooks branch from 932af60 to 59cfb3e Compare March 21, 2026 20:49
@lyzno1

lyzno1 commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Two things I think still need to be adjusted here:

  1. lint-staged should stay in the catalog. The root repo can drop its lint-staged config/dependency, but packages/cli still imports lint-staged to implement vp staged, so packages/cli/package.json should keep "lint-staged": "catalog:".

  2. This also needs to be wired into contributor setup. Since pnpm-workspace.yaml has ignoreScripts: true, prepare: vp config will not run during pnpm install. just init should explicitly run vp config after install so contributors actually get core.hooksPath configured.

@fengmk2
fengmk2 force-pushed the chore--migrate-from-Husky-to-vp-config-for-git-hooks branch from e35d7ff to 5cf346e Compare August 14, 2026 03:48
@fengmk2

fengmk2 commented Aug 14, 2026

Copy link
Copy Markdown
Member

@Arthie I will take over and fix conflicts before merging.

@fengmk2 fengmk2 self-assigned this Aug 14, 2026
@fengmk2 fengmk2 changed the title chore: migrate from Husky to vp config for git hooks chore: replace husky with vp git hooks Aug 14, 2026
@fengmk2
fengmk2 force-pushed the chore--migrate-from-Husky-to-vp-config-for-git-hooks branch from 5cf346e to 2d52dc0 Compare August 14, 2026 05:45
Arthie and others added 2 commits August 14, 2026 14:39
- Replace Husky pre-commit hook with .vite-hooks/pre-commit
- Move lint-staged config from package.json to vite.config.ts
- Remove husky and lint-staged dependencies
- 'vp config': Add Claude MCP server configuration for vite-plus
- 'vp config': Update CLAUDE.md with Vite+ workflow documentation
@fengmk2
fengmk2 force-pushed the chore--migrate-from-Husky-to-vp-config-for-git-hooks branch from 2d52dc0 to 0145dec Compare August 14, 2026 06:40
@fengmk2
fengmk2 merged commit 5a9fd2b into voidzero-dev:main Aug 14, 2026
45 checks passed
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.

4 participants