Skip to content

Commit 248dd9e

Browse files
committed
chore: standardize husky configuration
1 parent d5a69f1 commit 248dd9e

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"prettier": "prettier --write --ignore-unknown .",
3838
"start": "dumi dev",
3939
"test": "rc-test",
40-
"tsc": "tsc --noEmit"
40+
"tsc": "tsc --noEmit",
41+
"prepare": "husky"
4142
},
4243
"dependencies": {
4344
"@rc-component/util": "^1.11.1",
@@ -65,13 +66,18 @@
6566
"react-dom": "^18.3.1",
6667
"regenerator-runtime": "^0.14.1",
6768
"sinon": "^9.0.2",
68-
"typescript": "^5.9.3"
69+
"typescript": "^5.9.3",
70+
"husky": "^9.1.7",
71+
"lint-staged": "^16.4.0"
6972
},
7073
"peerDependencies": {
7174
"react": ">=16.9.0",
7275
"react-dom": ">=16.9.0"
7376
},
7477
"publishConfig": {
7578
"access": "public"
79+
},
80+
"lint-staged": {
81+
"*": "prettier --write --ignore-unknown"
7682
}
7783
}

0 commit comments

Comments
 (0)