Skip to content

Commit d574c19

Browse files
committed
chore: standardize husky configuration
1 parent 5db958b commit d574c19

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
@@ -30,7 +30,7 @@
3030
"docs:deploy": "gh-pages -d docs-dist",
3131
"deploy": "npm run gh-pages",
3232
"compile": "father build",
33-
"prepare": "dumi setup",
33+
"prepare": "husky && dumi setup",
3434
"gh-pages": "cross-env GH_PAGES=1 npm run docs:build && npm run docs:deploy",
3535
"prepublishOnly": "npm run compile && rc-np",
3636
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js",
@@ -65,13 +65,18 @@
6565
"rc-test": "^7.1.3",
6666
"react": "^18.3.1",
6767
"react-dom": "^18.3.1",
68-
"typescript": "^5.9.3"
68+
"typescript": "^5.9.3",
69+
"husky": "^9.1.7",
70+
"lint-staged": "^16.4.0"
6971
},
7072
"peerDependencies": {
7173
"react": ">=16.9.0",
7274
"react-dom": ">=16.9.0"
7375
},
7476
"publishConfig": {
7577
"access": "public"
78+
},
79+
"lint-staged": {
80+
"*": "prettier --write --ignore-unknown"
7681
}
7782
}

0 commit comments

Comments
 (0)