chore: add husky pre-commit hook and auto-fix lint warnings

- Install husky for git hooks
- Add pre-commit hook to run 'npm run lint -- --fix' before each commit
- Auto-fix 6 additional warnings (attribute order, escape chars)
- 0 errors, 208 warnings (down from 214)

This ensures code quality checks run automatically before commits.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
sanbuphy
2026-02-20 01:19:00 +08:00
parent 66b2ba6e45
commit 4aca9df44e
6 changed files with 28 additions and 8 deletions
+5 -3
View File
@@ -10,7 +10,8 @@
"format": "prettier --write .",
"verify": "bash scripts/verify.sh",
"lint": "eslint docs/.vitepress/theme",
"lint:fix": "eslint docs/.vitepress/theme --fix"
"lint:fix": "eslint docs/.vitepress/theme --fix",
"prepare": "husky"
},
"keywords": [
"easy-vibe",
@@ -26,9 +27,10 @@
"@eslint/js": "^9.0.0",
"eslint": "^9.0.0",
"eslint-plugin-vue": "^9.30.0",
"vue-eslint-parser": "^9.4.3",
"husky": "^9.1.7",
"markdown-it-katex": "^2.0.3",
"prettier": "^3.7.4"
"prettier": "^3.7.4",
"vue-eslint-parser": "^9.4.3"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.2",