forked from iod/cpnode-front
chore: add husky and lint-staged
This commit is contained in:
parent
4908523bc4
commit
32d835ff27
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
_
|
4
.husky/pre-commit
Normal file
4
.husky/pre-commit
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx lint-staged
|
4
.lintstagedrc.json
Normal file
4
.lintstagedrc.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"src/**/*.{js,ts,tsx,vue}": "eslint --cache --fix",
|
||||||
|
"src/**/*.{css,scss,vue,tsx}": "stylelint --fix"
|
||||||
|
}
|
974
package-lock.json
generated
974
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,8 @@
|
|||||||
"eslint": "eslint src/**/*.{js,ts,tsx,vue}",
|
"eslint": "eslint src/**/*.{js,ts,tsx,vue}",
|
||||||
"eslint:fix": "eslint src/**/*.{js,ts,tsx,vue} --fix",
|
"eslint:fix": "eslint src/**/*.{js,ts,tsx,vue} --fix",
|
||||||
"stylelint": "stylelint src/**/*.{css,scss,vue,tsx}",
|
"stylelint": "stylelint src/**/*.{css,scss,vue,tsx}",
|
||||||
"stylelint:fix": "stylelint src/**/*.{css,scss,vue,tsx} --fix"
|
"stylelint:fix": "stylelint src/**/*.{css,scss,vue,tsx} --fix",
|
||||||
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"prettier": "@daotl/prettier-config",
|
"prettier": "@daotl/prettier-config",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -43,6 +44,8 @@
|
|||||||
"@fesjs/plugin-sass": "^2.0.0",
|
"@fesjs/plugin-sass": "^2.0.0",
|
||||||
"@vue/compiler-sfc": "^3.2.26",
|
"@vue/compiler-sfc": "^3.2.26",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
"husky": "^7.0.4",
|
||||||
|
"lint-staged": "^12.1.4",
|
||||||
"postcss-html": "^1.3.0",
|
"postcss-html": "^1.3.0",
|
||||||
"stylelint": "^14.2.0",
|
"stylelint": "^14.2.0",
|
||||||
"stylelint-config-property-sort-order-smacss": "^8.0.0",
|
"stylelint-config-property-sort-order-smacss": "^8.0.0",
|
||||||
@ -58,5 +61,8 @@
|
|||||||
"@fesjs/plugin-model": "^2.0.3",
|
"@fesjs/plugin-model": "^2.0.3",
|
||||||
"ant-design-vue": "^2.2.0",
|
"ant-design-vue": "^2.2.0",
|
||||||
"vue": "^3.2.6"
|
"vue": "^3.2.6"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.css": "stylelint --fix"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user