Skip to content

Commit

Permalink
build: 通过lintstaged对scss文件进行增量校验,避免npm run stylelint全量校验的时间浪费
Browse files Browse the repository at this point in the history
  • Loading branch information
ranwawa authored and CheshireJCat committed Oct 12, 2024
1 parent 6cfad22 commit 1b40a08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
npm run stylelint
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -157,4 +160,4 @@
"printBasicPrototype": false
}
}
}
}

0 comments on commit 1b40a08

Please sign in to comment.