Skip to content

Commit

Permalink
chore: add husky and lint-staged (#1062)
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored Aug 31, 2024
1 parent 3927d01 commit 11ae2ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@
"scripts": {
"start": "dumi dev",
"build": "dumi build",
"prepare": "dumi setup",
"prepare": "husky && dumi setup",
"compile": "father build && lessc assets/index.less assets/index.css",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"lint": "eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js",
"test": "rc-test",
"tsc": "tsc --noEmit",
"now-build": "npm run build"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown"
},
"peerDependencies": {
"react": "*",
"react-dom": "*"
Expand Down Expand Up @@ -67,8 +70,10 @@
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-unicorn": "^50.0.1",
"father": "^4.0.0",
"husky": "^9.1.5",
"jsonp": "^0.2.1",
"less": "^4.2.0",
"lint-staged": "^15.2.9",
"np": "^9.2.0",
"prettier": "^3.1.1",
"querystring": "^0.2.1",
Expand Down

0 comments on commit 11ae2ad

Please sign in to comment.