Skip to content

Commit f6113ec

Browse files
committed
✨ feat: 增加eslint校验
1 parent 53c8028 commit f6113ec

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

.husky/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
export NVM_DIR="$HOME/.nvm"
3+
4+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
5+
6+
npx lint-staged

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
"release": "bumpp -r",
1717
"lint": "eslint --cache .",
1818
"lint:fix": "nr lint --fix",
19-
"lint:type": "tsc --noEmit",
20-
"test": "vitest",
21-
"test:ui": "vitest --ui",
22-
"test:coverage": "vitest run --coverage"
19+
"stylelint:fix": "stylelint **/*.{css,scss,html,vue} --fix"
2320
},
2421
"dependencies": {
22+
"husky": "^9.1.7",
2523
"ui-utils-kit": "^1.1.0"
2624
},
2725
"devDependencies": {
@@ -39,10 +37,7 @@
3937
"vite": "^5.4.11",
4038
"vitest": "^2.1.5"
4139
},
42-
"simple-git-hooks": {
43-
"pre-commit": "npx lint-staged"
44-
},
4540
"lint-staged": {
46-
"*": "eslint --fix"
41+
"*.{js,ts,tsx,vue}": "eslint --fix"
4742
}
4843
}

pnpm-lock.yaml

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)