chore: fix lint-staged

pull/33/head
xingyu 2023-08-31 15:24:43 +08:00
parent c4f65af100
commit 9eb91429be
1 changed files with 24 additions and 3 deletions

View File

@ -36,8 +36,8 @@
"preview:dist": "vite preview",
"clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
"clean:lib": "rimraf node_modules",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint": "eslint \"src/**/*.{vue,ts,tsx}\"",
"lint:fix": "eslint \"src/**/*.{vue,ts,tsx}\" --fix",
"lint:stylelint": "stylelint \"**/*.{vue,css,less,scss}\" --fix --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged",
"npm:check": "npx npm-check-updates",
@ -142,7 +142,28 @@
"vue-tsc": "^1.8.8"
},
"lint-staged": {
"*": "eslint --fix"
"*.{js,jsx,ts,tsx}": [
"prettier --write",
"eslint --fix"
],
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
"prettier --write--parser json"
],
"package.json": [
"prettier --write"
],
"*.vue": [
"prettier --write",
"eslint --fix",
"stylelint --fix"
],
"*.{scss,less,styl,html}": [
"prettier --write",
"stylelint --fix"
],
"*.md": [
"prettier --write"
]
},
"config": {
"commitizen": {