From d36e328cafca4b43b207ce8de0c6fe5fb662c47e Mon Sep 17 00:00:00 2001 From: Joost Smit Date: Wed, 17 Jun 2026 14:15:20 +0200 Subject: [PATCH 1/4] chore: add git hook for validation --- .husky/pre-push | 3 +++ package.json | 2 ++ pnpm-lock.yaml | 10 ++++++++++ 3 files changed, 15 insertions(+) create mode 100644 .husky/pre-push diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 00000000..0b3134f7 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,3 @@ +pnpm tsc +pnpm lint +pnpm test diff --git a/package.json b/package.json index 68b7829d..541c3086 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "build": "tsdown", "build:server": "tsdown --config tsdown.server.config.js", "check": "biome check && tsc", + "prepare": "husky", "format": "biome check --fix", "lint": "biome check", "publish:ci": "pnpm build && pnpm changeset publish", @@ -59,6 +60,7 @@ "@types/qs": "6.15.1", "@vitest/coverage-v8": "4.1.6", "fishery": "2.4.0", + "husky": "9.1.7", "msw": "2.14.6", "pino-pretty": "^13.1.3", "publint": "0.3.21", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dde2b0bc..ecd0adf4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,6 +63,9 @@ importers: fishery: specifier: 2.4.0 version: 2.4.0 + husky: + specifier: 9.1.7 + version: 9.1.7 msw: specifier: 2.14.6 version: 2.14.6(@types/node@25.9.1)(typescript@6.0.3) @@ -1330,6 +1333,11 @@ packages: resolution: {integrity: sha512-tsYlhAYpjCKa//8rXZ9DqKEawhPoSytweBC2eNvcaDK+57RZLHGqNs3PZTQO6yekLFSuvA6AlnAfrw1uBvtb+Q==} hasBin: true + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} + engines: {node: '>=18'} + hasBin: true + iconv-lite@0.7.2: resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} engines: {node: '>=0.10.0'} @@ -3194,6 +3202,8 @@ snapshots: human-id@4.1.3: {} + husky@9.1.7: {} + iconv-lite@0.7.2: dependencies: safer-buffer: 2.1.2 From 3064b1dcee2594ae956e820e2191e62ae883c2e6 Mon Sep 17 00:00:00 2001 From: Joost Smit Date: Wed, 17 Jun 2026 14:25:43 +0200 Subject: [PATCH 2/4] chore: fail on first failure in prepush script --- .husky/pre-push | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.husky/pre-push b/.husky/pre-push index 0b3134f7..a19dde06 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,3 +1,6 @@ +#!/usr/bin/env sh +set -e + pnpm tsc pnpm lint pnpm test From 0091b9400b467ef318ba3d888f89c8693b4f7c51 Mon Sep 17 00:00:00 2001 From: Joost Smit Date: Wed, 17 Jun 2026 14:30:51 +0200 Subject: [PATCH 3/4] chore: write any formatting issues in the git push hook --- .husky/pre-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/pre-push b/.husky/pre-push index a19dde06..0719837e 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -2,5 +2,5 @@ set -e pnpm tsc -pnpm lint +pnpm format pnpm test From bb714a975d5b8c92720b90a6e592d8404330c056 Mon Sep 17 00:00:00 2001 From: Joost Smit Date: Wed, 17 Jun 2026 14:33:36 +0200 Subject: [PATCH 4/4] chore: replace biome write with pnpm check --- .husky/pre-push | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.husky/pre-push b/.husky/pre-push index 0719837e..5bc19b13 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,6 +1,5 @@ #!/usr/bin/env sh set -e -pnpm tsc -pnpm format +pnpm check pnpm test