git commit时pre-commit提示e have no
2020-11-12 本文已影响0人
心大的少年
我们的项目用到了commitline和pre-commit,但是不知道为什么突然间执行commit的时候会提示一段莫名奇妙的信息:
pre-commit:
pre-commit: We have nothing pre-commit hooks to run. Either you're missing the `scripts`
pre-commit: in your `package.json` or have configured pre-commit to run no the `scripts`thing. thing.
pre-commit: Skipping the pre-commit hook.
pre-commit:
解决办法:
再package.json的中加上
"scripts": {
"precommit-msg": "echo 'Pre-commit checks...' && exit 0"
},
"pre-commit": [ "precommit-msg", "lint" ],