调整lint-staged配置

This commit is contained in:
hooray
2021-12-13 14:52:54 +08:00
parent ffa1541ef5
commit bf3a9ccc8b
4 changed files with 7 additions and 7 deletions
-5
View File
@@ -1,5 +0,0 @@
module.exports = {
'src/**/*.js': ['eslint --fix'],
'src/**/*.vue': ['eslint --fix', 'stylelint --fix'],
'src/**/*.{scss,less}': ['stylelint --fix']
}
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
pnpm lint-staged -c ./.husky/lintstagedrc.js
pnpm lint-staged
+5
View File
@@ -0,0 +1,5 @@
{
"src/**/*.js": "eslint --fix",
"src/**/*.{css,scss}": "stylelint --fix",
"src/**/*.vue": ["eslint --fix", "stylelint --fix"]
}
+1 -1
View File
@@ -10,7 +10,7 @@
"svgo": "svgo -f src/assets/icons",
"new": "plop",
"lint:eslint": "eslint src/**/*.{js,vue} --fix",
"lint:stylelint": "stylelint src/**/*.{vue,scss,less} --fix",
"lint:stylelint": "stylelint src/**/*.{css,scss,vue} --fix",
"prepare": "husky install",
"preinstall": "npx only-allow pnpm"
},