Skip to content

Commit 9408c5a

Browse files
committed
Add husky pre-commit scripts
1 parent b04e691 commit 9408c5a

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

scripts/.husky/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cd scripts
2+
npm run typecheck
3+
npm run test
4+
npm run build
5+
npm run sync-sources
6+
npm run generate-changelog

scripts/package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
"test": "TZ=UTC jest",
1111
"typecheck": "tsc --noEmit",
1212
"generate-changelog": "node bin/generate-changelog",
13-
"sync-sources": "node bin/sync-sources"
13+
"sync-sources": "node bin/sync-sources",
14+
"prepare": "cd .. && husky scripts/.husky"
1415
},
1516
"license": "ISC",
1617
"devDependencies": {
1718
"@jest/globals": "^29.7.0",
1819
"@types/jest": "^29.5.12",
1920
"@types/node": "^20.11.30",
21+
"husky": "^9.0.11",
2022
"jest": "^29.7.0",
2123
"ts-jest": "^29.1.2",
2224
"tsx": "^4.7.1",

0 commit comments

Comments
 (0)