Skip to content

Commit 5f1fbd8

Browse files
committed
Add pre-commit hook
1 parent 25ad678 commit 5f1fbd8

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-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 release:check

package-lock.json

Lines changed: 22 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
@@ -17,10 +17,11 @@
1717
"type:check": "tsc --noEmit true",
1818
"storybook": "start-storybook -p 6006",
1919
"build:storybook": "build-storybook",
20-
"release:check": "run-s lint test type:check",
20+
"release:check": "run-s lint type:check test",
2121
"release:test": "npm publish --dry-run",
2222
"release": "run-s release:check release:test build np",
23-
"size": "size-limit"
23+
"size": "size-limit",
24+
"prepare": "husky install"
2425
},
2526
"np": {
2627
"yarn": false,
@@ -82,6 +83,7 @@
8283
"eslint-plugin-prettier": "^4.2.1",
8384
"eslint-plugin-promise": "^6.1.1",
8485
"eslint-plugin-react": "^7.31.11",
86+
"husky": "^8.0.0",
8587
"jest": "^29.3.1",
8688
"jest-environment-jsdom": "^29.3.1",
8789
"np": "*",

0 commit comments

Comments
 (0)