Skip to content

Commit c3b7923

Browse files
add git pre-commit check
1 parent bec0018 commit c3b7923

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run quality

package-lock.json

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

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"test:watch": "vitest",
1919
"test:coverage": "vitest run --coverage",
2020
"compile-typst-examples": "jiti scripts/compile-typst-examples.ts",
21-
"quality": "prettier -c . && eslint . && tsc -b && npm run test"
21+
"quality": "prettier -c . && eslint . && tsc -b && npm run test",
22+
"prepare": "husky install"
2223
},
2324
"dependencies": {
2425
"@ant-design/v5-patch-for-react-19": "^1.0.3",
@@ -89,6 +90,7 @@
8990
"typescript": "~5.9.3",
9091
"typescript-eslint": "^8.45.0",
9192
"vite": "^7.1.7",
92-
"vitest": "^4.0.10"
93+
"vitest": "^4.0.10",
94+
"husky": "^8.0.0"
9395
}
9496
}

0 commit comments

Comments
 (0)