From 3eb762294389925b61e26be3a8fed1fb559fd17e Mon Sep 17 00:00:00 2001 From: Mathieu Picciolli Date: Tue, 21 Jul 2026 17:15:01 -0400 Subject: [PATCH 1/2] chore: add husky git hooks and update lint-staged config - Add pre-commit hook running lint-staged - Add pre-push hook running build and tests - Run biome lint --write alongside biome check in lint-staged - Update prepare script to husky v9+ syntax Co-Authored-By: Claude Opus 4.8 --- .husky/pre-commit | 1 + .husky/pre-push | 1 + .lintstagedrc.json | 4 ++-- package.json | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .husky/pre-commit create mode 100755 .husky/pre-push diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..2312dc5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..192cb67 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1 @@ +npm run build && npm test diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 596339b..4035262 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,4 +1,4 @@ { - "*.json": ["biome check --write"], - "*.ts": ["biome check --write"] + "*.json": ["biome check --write", "biome lint --write"], + "*.ts": ["biome check --write", "biome lint --write"] } diff --git a/package.json b/package.json index a6b742d..cd85678 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "test": "vitest run", "test:watch": "vitest", "coverage": "vitest run --coverage", - "prepare": "husky install", + "prepare": "husky", "pack": "mcpb pack . dist/pcm-mcp.mcpb", "start": "node ./dist/index.js", "start:dev": "tsup --watch --onSuccess \"node ./dist/index.js\"" From 3894acf51042eec1bc16c5d8f29521e17b898e39 Mon Sep 17 00:00:00 2001 From: Mathieu Picciolli Date: Tue, 21 Jul 2026 18:09:13 -0400 Subject: [PATCH 2/2] chore: update pre-commit hook to use npm exec and simplify lint-staged commands --- .husky/pre-commit | 2 +- .lintstagedrc.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 2312dc5..8b73430 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -npx lint-staged +npm exec -- lint-staged diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 4035262..596339b 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,4 +1,4 @@ { - "*.json": ["biome check --write", "biome lint --write"], - "*.ts": ["biome check --write", "biome lint --write"] + "*.json": ["biome check --write"], + "*.ts": ["biome check --write"] }