chore: 添加 lint-staged

This commit is contained in:
ChenZhaoYu
2023-02-13 11:03:10 +08:00
parent f910b5f8a4
commit 11544ff24b
7 changed files with 1118 additions and 3 deletions

View File

@@ -14,10 +14,11 @@
"dev": "vite",
"build": "run-p type-check build-only",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit",
"lint": "eslint . --fix --ignore-path .gitignore",
"release": "bumpp package.json --commit --push --tag"
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"release": "bumpp package.json --commit --push --tag",
"prepare": "husky install"
},
"dependencies": {
"naive-ui": "^2.34.3",
@@ -25,6 +26,8 @@
},
"devDependencies": {
"@antfu/eslint-config": "^0.35.2",
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@iconify/vue": "^4.1.0",
"@types/node": "^18.13.0",
"@vitejs/plugin-vue": "^4.0.0",
@@ -32,11 +35,20 @@
"axios": "^1.3.2",
"bumpp": "^8.2.1",
"eslint": "^8.34.0",
"husky": "^8.0.3",
"lint-staged": "^13.1.1",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.21",
"rimraf": "^4.1.2",
"tailwindcss": "^3.2.6",
"typescript": "~4.9.5",
"vite": "^4.1.1",
"vue-tsc": "^1.0.24"
},
"lint-staged": {
"*.{js,ts,jsx,tsx,vue}": [
"pnpm run lint:fix",
"pnpm run type-check"
]
}
}