Browse Source

chore: fix lint-staged

main
xingyu 2 years ago
parent
commit
9eb91429be
  1. 27
      package.json

27
package.json

@ -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": {