Skip to content

Commit 2ec621b

Browse files
committed
fix: fixed husky and pre-commit
1 parent dc35c33 commit 2ec621b

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

.husky/commit-msg

Lines changed: 0 additions & 4 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
npx --no-install lint-staged && npm test
1+
npm run pre-commit

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
},
7979
"scripts": {
8080
"lint": "xo --fix && remark . -qfo && fixpack",
81-
"prepare": "husky install",
81+
"pre-commit": "lint-staged",
82+
"prepare": "husky",
8283
"pretest": "npm run lint",
8384
"test": "cross-env NODE_ENV=test nyc ava"
8485
}

0 commit comments

Comments
 (0)