yuanrui / blog

Some notes.
http://yuanrui.github.io
3 stars 0 forks source link

烦人的husky > pre-commit #56

Open yuanrui opened 1 year ago

yuanrui commented 1 year ago

又遇到烦人的nodejs项目导致无法提交的问题。

husky > pre-commit (node v16.17.1)
Stashing changes... [started]
Stashing changes... [skipped]
→ No partially staged files found...
Running linters... [started]
Running tasks for src/**/*.{js,vue} [started]
eslint --fix [started]
eslint --fix [failed]
→ 
Running tasks for src/**/*.{js,vue} [failed]
→ 
Running linters... [failed]

✖ eslint --fix found some errors. Please fix them and try committing again.

F:\XXX.WebUI\src\layout\components\Sidebar\Logo.vue
52:8  error  'Logo' is defined but never used  no-unused-vars

✖ 1 problem (1 error, 0 warnings)
husky > pre-commit hook failed (add --no-verify to bypass) 

删除 .git/hooks目录下的pre-commit文件解决之。