目录

1、今天在提交前端代码时突然发现这个包错,尝试了下面方法,已解决。

2、解决方式一:修改提交信息, 使其符合规范

3、解决方式二:直接卸载工具


1、今天在提交前端代码时突然发现这个包错,尝试了下面方法,已解决。

✖ subject may not be empty [subject-empty]

✖ type may not be empty [type-empty]

✖ found 2 problems, 0 warnings

ⓘ Get help: GitHub - conventional-changelog/commitlint: 📓 Lint commit messages

原因是使用了规范commit信息的工具,你的提交信息不符合规范,所以被拒绝了

commit规范工具

  • commitlint
  • husky

2、解决方式一:修改提交信息, 使其符合规范

git commit -m "feat: 新功能"

3、解决方式二:直接卸载工具

npm uninstall husky
Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐