Skip to content

Commit 7bb00d6

Browse files
committed
chore: standardize husky configuration
1 parent 223933d commit 7bb00d6

2 files changed

Lines changed: 8 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: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"gh-pages": "cross-env GH_PAGES=1 npm run docs:build && npm run docs:deploy",
3535
"lint": "eslint src/ --ext .tsx,.ts",
3636
"lint:tsc": "tsc -p tsconfig.json --noEmit",
37-
"prepare": "dumi setup",
37+
"prepare": "husky && dumi setup",
3838
"prepublishOnly": "npm run compile && rc-np",
3939
"prettier": "prettier --write --ignore-unknown .",
4040
"start": "dumi dev",
@@ -69,7 +69,9 @@
6969
"rc-test": "^7.1.3",
7070
"react": "^18.3.1",
7171
"react-dom": "^18.3.1",
72-
"typescript": "^5.9.3"
72+
"typescript": "^5.9.3",
73+
"husky": "^9.1.7",
74+
"lint-staged": "^16.4.0"
7375
},
7476
"peerDependencies": {
7577
"react": ">=16.9.0",
@@ -80,5 +82,8 @@
8082
},
8183
"publishConfig": {
8284
"access": "public"
85+
},
86+
"lint-staged": {
87+
"*": "prettier --write --ignore-unknown"
8388
}
8489
}

0 commit comments

Comments
 (0)