Skip to content

Commit 6b5435c

Browse files
committed
chore: standardize husky configuration
1 parent b26ebba commit 6b5435c

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.husky/pre-commit

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

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"prettier": "prettier --write --ignore-unknown .",
3737
"start": "dumi dev",
3838
"test": "rc-test",
39-
"tsc": "tsc --noEmit"
39+
"tsc": "tsc --noEmit",
40+
"prepare": "husky"
4041
},
4142
"dependencies": {
4243
"@rc-component/util": "^1.11.1",
@@ -75,5 +76,8 @@
7576
"style": "./assets/index.css",
7677
"publishConfig": {
7778
"access": "public"
79+
},
80+
"lint-staged": {
81+
"*": "prettier --write --ignore-unknown"
7882
}
7983
}

0 commit comments

Comments
 (0)