build: 通过lintstaged对scss文件进行增量校验,避免npm run stylelint全量校验的时间浪费

This commit is contained in:
ranqirong 2024-10-12 12:50:23 +08:00 committed by lmaomaoz
parent 6cfad22de3
commit 1b40a08eea
2 changed files with 5 additions and 3 deletions

View File

@ -2,4 +2,3 @@
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
npm run stylelint

View File

@ -36,8 +36,11 @@
}
},
"lint-staged": {
"{packages,examples}/**/{src,examples}/**/**/*.{tsx,jsx,ts}": [
"{packages,examples}/**/{src,examples}/**/**/*.{tsx,jsx,ts,scss}": [
"prettier --write"
],
"*.{scss}": [
"stylelint --fix"
]
},
"dependencies": {