Skip to content

Commit 6fae981

Browse files
committed
test: add pre-commit check
1 parent 1bb33e4 commit 6fae981

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm test

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"dev": "vite",
77
"build": "tsc && vite build",
88
"preinstall": "npx only-allow pnpm",
9-
"test": "jest"
9+
"test": "jest",
10+
"prepare": "husky install"
1011
},
1112
"license": "MIT",
1213
"dependencies": {
@@ -26,6 +27,7 @@
2627
"@typescript-eslint/parser": "5.45.0",
2728
"conventional-changelog-conventionalcommits": "5.0.0",
2829
"eslint": "8.28.0",
30+
"husky": "^8.0.3",
2931
"jest": "^29.5.0",
3032
"jest-environment-jsdom": "^29.5.0",
3133
"semantic-release": "19.0.5",
@@ -38,4 +40,4 @@
3840
"id": "_eindex-logseq-memos-sync",
3941
"icon": "./logo.webp"
4042
}
41-
}
43+
}

pnpm-lock.yaml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)