build: update rules

This commit is contained in:
Fine 2022-12-15 13:28:46 +08:00
parent cf0dd0f260
commit 4582b73102
2 changed files with 1 additions and 27 deletions

View File

@ -29,4 +29,3 @@ PATH="/usr/local/bin:$PATH"
npm run lint npm run lint
npm run lint:prettier npm run lint:prettier
npm run lint:stylelint npm run lint:stylelint
npm run lint:lint-staged

View File

@ -14,7 +14,6 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", "lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged",
"prepare": "husky install" "prepare": "husky install"
}, },
"dependencies": { "dependencies": {
@ -82,29 +81,5 @@
"> 1%", "> 1%",
"last 2 versions", "last 2 versions",
"not dead" "not dead"
], ]
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
],
"*.vue": [
"eslint --fix",
"prettier --write",
"stylelint --fix --custom-syntax postcss-html"
],
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
"prettier --write--parser json"
],
"package.json": [
"prettier --write"
],
"*.{scss,less,styl}": [
"stylelint --fix",
"prettier --write"
],
"*.md": [
"prettier --write"
]
}
} }