Skip to content

Commit

Permalink
test husky
Browse files Browse the repository at this point in the history
  • Loading branch information
bigCows committed Oct 18, 2023
1 parent b3d3f06 commit 81411f2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ module.exports = {
"stylelint-config-recommended-vue/scss", // 配置 vue 中 scss 样式格式化
"stylelint-config-recess-order", // 配置 stylelint css 属性书写顺序插件,
],
// plugins: [
// 'stylelint-order', // 配置 stylelint css 属性书写顺序插件
// ],
overrides: [
// 扫描 .vue/html 文件中的 <style> 标签内的样式
{
files: ["**/*.{vue,html}"],
files: ["**/*.{vue,html}, **/*.css, **/*.scss"],
customSyntax: "postcss-html"
}
],
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
"lint": "eslint . --ext .vue,.js,.ts --fix",
"style": "stylelint \"src/**/*.(vue|scss|css)\" --fix"
},
"husky": {
"hooks": {
"pre-commit": "echo 'husky start working...' pnpm run lint && pnpm run style"
}
},
"lint-staged": {
"*.{vue,js,ts,jsx,tsx,css,sass,scss,json,md}": [
"prettier --write"
Expand Down Expand Up @@ -46,6 +51,7 @@
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-vue": "^9.17.0",
"husky": "^8.0.3",
"jsdom": "^22.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.3",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 81411f2

Please sign in to comment.