mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-05-21 16:29:15 +08:00
fix: modfiy githook to husky
This commit is contained in:
parent
f061fcd4ad
commit
2f8147f9b5
4
.husky/commit-msg
Normal file
4
.husky/commit-msg
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install commitlint --edit $1
|
4
.husky/pre-commit
Normal file
4
.husky/pre-commit
Normal file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,7 +1,7 @@
|
||||
{
|
||||
"editor.tabSize": 2,
|
||||
"editor.formatOnSave": false,
|
||||
"eslint.format.enable": true,
|
||||
"eslint.format.enable": false,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
},
|
||||
|
10
package.json
10
package.json
@ -42,7 +42,7 @@
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint . --fix",
|
||||
"prepare": "npx simple-git-hooks",
|
||||
"prepare": "husky install",
|
||||
"commit": "cz",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md"
|
||||
},
|
||||
@ -82,13 +82,13 @@
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"cz-customizable": "^7.0.0",
|
||||
"eslint": "^8.36.0",
|
||||
"husky": "^8.0.3",
|
||||
"less": "^4.1.3",
|
||||
"lint-staged": "^13.1.0",
|
||||
"mockjs": "^1.1.0",
|
||||
"naive-ui": "^2.34.4",
|
||||
"rollup-plugin-visualizer": "^5.9.0",
|
||||
"simple-git-hooks": "^2.8.1",
|
||||
"typescript": "^5.1.3",
|
||||
"typescript": "^5.0.0",
|
||||
"unocss": "^0.53.1",
|
||||
"unplugin-auto-import": "^0.16.4",
|
||||
"unplugin-icons": "^0.16.3",
|
||||
@ -101,10 +101,6 @@
|
||||
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||
"vue-tsc": "^1.6.5"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"pre-commit": "pnpm lint-staged",
|
||||
"commit-msg": "pnpm commitlint -e"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,mjs,ts,tsx,json,md,yml}": [
|
||||
"eslint --fix"
|
||||
|
Loading…
x
Reference in New Issue
Block a user