diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 00000000..5bc19b13 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +set -e + +pnpm check +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