Browse Source

清理git lint

xiangheng 2 years ago
parent
commit
128a067c28
  1. 4
      .husky/commit-msg
  2. 4
      .husky/pre-commit
  3. 21
      package.json

4
.husky/commit-msg

@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm commitlint --edit

4
.husky/pre-commit

@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm lint-staged

21
package.json

@ -6,7 +6,6 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"prepare": "husky install",
"lint:eslint": "eslint \"src/**/*.{vue,js,jsx}\" --fix",
"lint:stylelint": "stylelint \"src/**/*.{vue,css,less,scss}\" --fix"
},
@ -20,8 +19,6 @@
"xe-utils": "^3.5.7"
},
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@vitejs/plugin-legacy": "^4.0.2",
"@vitejs/plugin-vue2": "^2.2.0",
"autoprefixer": "^10.4.14",
@ -30,9 +27,8 @@
"eslint-define-config": "^1.5.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.1.1",
"husky": "^8.0.1",
"less": "^4.1.3",
"lint-staged": "^13.0.3",
"postcss-html": "^1.4.1",
"postcss-less": "^6.0.0",
"prettier": "^2.7.1",
@ -51,20 +47,5 @@
},
"browserslist": [
"defaults"
],
"lint-staged": {
"*.{js,ts,jsx,tsx}": [
"prettier --write",
"eslint --fix"
],
"*.vue": [
"stylelint --fix",
"prettier --write",
"eslint --fix"
],
"*.{less,css}": [
"stylelint --fix",
"prettier --write"
]
}
}

Loading…
Cancel
Save