赞
踩
22:13 Commit failed with error 0 file committed, 8 files failed to commit: 修改移动端登陆token失效的问题1.1 husky > pre-commit (node v16.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. C:\wangyanan\daan\project\86\pro\src\api\survey\login.js 39:34 error 'token2' is not defined no-undef 55:34 error 'token2' is not defined no-undef 66:34 error 'token2' is not defined no-undef ✖ 3 problems (3 errors, 0 warnings) husky > pre-commit hook failed (add --no-verify to bypass)
在使用命令 git commit -m ‘提交信息’ 将本地代码提交到远程仓库时候, 如果项目安装了 per-commit,则会在Git键入提交信息前进行代码风格检查,如果代码不符合相应规则,则报错。
解决方法有两种:
进入项目的.git文件夹(隐藏文件),根据路径 ./git/hooks/pre-commit 找到对应的pre-commit文件,直接删除。
git commit -m "提交页面备注" --no-verify
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。