Skip to content

Commit 87030fd

Browse files
committed
chore: standardize husky configuration
1 parent fd3bb81 commit 87030fd

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
@@ -32,7 +32,7 @@
3232
"docs:deploy": "gh-pages -d docs-dist",
3333
"gh-pages": "cross-env GH_PAGES=1 npm run docs:build && npm run docs:deploy",
3434
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
35-
"prepare": "dumi setup",
35+
"prepare": "husky && dumi setup",
3636
"prepublishOnly": "npm run compile && rc-np",
3737
"prettier": "prettier --write --ignore-unknown .",
3838
"postpublish": "npm run gh-pages",
@@ -64,7 +64,9 @@
6464
"rc-test": "^7.1.3",
6565
"react": "^18.3.1",
6666
"react-dom": "^18.3.1",
67-
"typescript": "^5.9.3"
67+
"typescript": "^5.9.3",
68+
"husky": "^9.1.7",
69+
"lint-staged": "^16.4.0"
6870
},
6971
"peerDependencies": {
7072
"react": ">=16.9.0",
@@ -75,5 +77,8 @@
7577
},
7678
"publishConfig": {
7779
"access": "public"
80+
},
81+
"lint-staged": {
82+
"*": "prettier --write --ignore-unknown"
7883
}
7984
}

0 commit comments

Comments
 (0)