取消git提交时precommit代码校验

用git进行代码管理,当我执行git commit操作时,会出现以下代码来检测提交的代码

Pro:hcf-vue hh$ git add --all
Pro:hcf-vue hh$ git commit -m'wq'
husky > pre-commit (node v8.11.2)
  ❯ Running tasks for src/**/*.{js,jsx,vue}
    ⠼ eslint

解决办法:

1.进入 项目所在文件夹>.git>hooks删除pre-commit文件

2.卸载precommit: npm uninstall precommit

3.取消package.json中的如下配置:

  "gitHooks": {
    "commit-msg": "fabric verify-commit"
  }

 



posted @ 2023-04-13 16:00  天官赐福·  阅读(1644)  评论(0编辑  收藏  举报
返回顶端