Skip to content

Commit 9f942d5

Browse files
authored
chore: add lint-staged and husky to package.json (#741)
1 parent d7bb0e0 commit 9f942d5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lint-staged

package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"prepublishOnly": "npm run compile && np --yolo --no-publish",
4141
"postpublish": "tnpm sync rc-menu",
4242
"start": "dumi dev",
43-
"test": "rc-test"
43+
"test": "rc-test",
44+
"prepare": "husky && dumi setup"
4445
},
4546
"dependencies": {
4647
"@babel/runtime": "^7.10.1",
@@ -66,7 +67,9 @@
6667
"eslint-plugin-unicorn": "^51.0.1",
6768
"father": "^4.0.0",
6869
"gh-pages": "^6.1.0",
70+
"husky": "^9.1.6",
6971
"less": "^4.1.3",
72+
"lint-staged": "^15.2.10",
7073
"np": "^10.0.5",
7174
"rc-test": "^7.0.14",
7275
"react": "^18.3.1",
@@ -77,5 +80,8 @@
7780
"peerDependencies": {
7881
"react": ">=16.9.0",
7982
"react-dom": ">=16.9.0"
83+
},
84+
"lint-staged": {
85+
"*": "prettier --write --ignore-unknown"
8086
}
8187
}

0 commit comments

Comments
 (0)