Skip to content

Commit 44d23db

Browse files
committed
chore: standardize husky configuration
1 parent 966a94d commit 44d23db

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
@@ -42,7 +42,8 @@
4242
"prettier": "prettier --write --ignore-unknown .",
4343
"start": "dumi dev",
4444
"test": "rc-test",
45-
"tsc": "tsc --noEmit"
45+
"tsc": "tsc --noEmit",
46+
"prepare": "husky"
4647
},
4748
"dependencies": {
4849
"@rc-component/motion": "^1.3.3",
@@ -72,13 +73,18 @@
7273
"react-dom": "^18.3.1",
7374
"regenerator-runtime": "^0.14.1",
7475
"typescript": "^5.9.3",
75-
"gh-pages": "^6.3.0"
76+
"gh-pages": "^6.3.0",
77+
"husky": "^9.1.7",
78+
"lint-staged": "^16.4.0"
7679
},
7780
"peerDependencies": {
7881
"react": ">=18.0.0",
7982
"react-dom": ">=18.0.0"
8083
},
8184
"publishConfig": {
8285
"access": "public"
86+
},
87+
"lint-staged": {
88+
"*": "prettier --write --ignore-unknown"
8389
}
8490
}

0 commit comments

Comments
 (0)