报错
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
husky > pre-commit (node v14.15.0)
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.
D:\BeysondItems\01runliancompany\04cms-v2-front\src\views\dashboard\components\settings.vue
356:33 error Parsing error: invalid-first-character-of-tag-name vue/no-parsing-error
356:43 error Parsing error: invalid-first-character-of-tag-name vue/no-parsing-error
356:47 error Parsing error: invalid-first-character-of-tag-name vue/no-parsing-error
✖ 3 problems (3 errors, 0 warnings)
husky > pre-commit hook failed (add --no-verify to bypass)
原因
项目中 package.json中配置了文章来源地址https://www.toymoban.com/news/detail-602208.html
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
解决
git commit -m "提交页面备注 绕过eslint检查" --no-verify
文章来源:https://www.toymoban.com/news/detail-602208.html
到了这里,关于#开发环境篇:husky > pre-commit (node v14.15.0)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!