现象
今天提交代码的时候出现了
> running pre-commit hook: lint-staged
Stashing changes... [started]
Stashing changes... [skipped]
→ No partially staged files found...
Running tasks... [started]
Running tasks for *.{js,jsx,vue,ts,tsx} [started]
vue-cli-service lint [started]
vue-cli-service lint [failed]
→
Running tasks for *.{js,tsx} [failed]
→
Running tasks... [failed]
× vue-cli-service lint found some errors. Please fix them and try committing again.
pre-commit hook failed (add --no-verify to bypass)
看见这样的场景我我是一脸懵逼的呀。
经过同事的讲解
原来是在在commit之前我们的代码做了一次检查
如果有代码不符合规范
就不能够进行提交
解决办法
经过检查我本地的代码
发现并不是由我本地引起的
最后没有找到原因
不得不的执行了
git commit -m “你的描述” --no-verify
忽略本次检查
代码提交成功