chore: 添加 lint-staged
This commit is contained in:
parent
f910b5f8a4
commit
11544ff24b
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": ["@commitlint/config-conventional"]
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
pnpm exec commitlint --config .commitlintrc.json --edit "${1}"
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
pnpm exec lint-staged
|
|
@ -23,6 +23,7 @@
|
|||
"axios",
|
||||
"bumpp",
|
||||
"chatgpt",
|
||||
"commitlint",
|
||||
"esno",
|
||||
"GPTAPI",
|
||||
"iconify",
|
||||
|
|
18
package.json
18
package.json
|
@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
1090
pnpm-lock.yaml
1090
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue