running pre-commit hook: lint-staged git提交不了

vue项目中有些做了语法校验,遇到了git提交失败,根据错误提示,成功解决了问题。

running pre-commit hook: lint-staged git提交不了

一、git提交失败

   git:>running pre-commit hook:lint-staged
二、错误分析
这句话的意思,大概是有一个钩子,提交前检查项目代码的规范,eslint的检查。提交失败的原因:项目中error过多,导致检测未通过,提交失败。

解决办法

running pre-commit hook: lint-staged git提交不了

一、不进行检查

   那就是删除掉pre-commit hook,具体位置在项目文件夹\.git\hooks目录下,找到文件pre-commit删除即可(如果看不到.git文件夹,可以吧系统的隐藏给打开。),再次提交成功!完美解决。

原创文章,作者:星辰,如若转载,请注明出处:http://www.z88j.com/401.html

(3)
打赏 微信扫一扫 微信扫一扫
上一篇 2021年8月19日 下午8:38
下一篇 2021年8月28日 下午11:49

相关推荐

发表回复

登录后才能评论

Warning: error_log(/www/wwwroot/www.z88j.com/wp-content/plugins/spider-analyser/#log/log-2920.txt): failed to open stream: No such file or directory in /www/wwwroot/www.z88j.com/wp-content/plugins/spider-analyser/spider.class.php on line 2900