提交至gitee时遇到如下问题: ERROR 提交日志不符合规范 合法的提交日志格式如下(emoji 和 模块可选填):
$ git commit -m "init"
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
[STARTED] Preparing...
[SUCCESS] Preparing...
[STARTED] Running tasks...
[STARTED] Running tasks for **/*.{js,jsx,ts,tsx}
[STARTED] Running tasks for **/*.{js,jsx,tsx,ts,less,md,json}
[STARTED] npm run lint-staged:js
[STARTED] prettier --write
[SUCCESS] prettier --write
[SUCCESS] Running tasks for **/*.{js,jsx,tsx,ts,less,md,json}
[SUCCESS] npm run lint-staged:js
[SUCCESS] Running tasks for **/*.{js,jsx,ts,tsx}
[SUCCESS] Running tasks...
[STARTED] Applying modifications...
[SUCCESS] Applying modifications...
[STARTED] Cleaning up...
[SUCCESS] Cleaning up...
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
ERROR 提交日志不符合规范
合法的提交日志格式如下(emoji 和 模块可选填):
[<emoji>] [revert: ?]<type>[(scope)?]: <message>
💥 feat(模块): 添加了个很棒的功能
🐛 fix(模块): 修复了一些 bug
📝 docs(模块): 更新了一下文档
🌷 UI(模块): 修改了一下样式
🏰 chore(模块): 对脚手架做了些更改
🌐 locale(模块): 为国际化做了微小的贡献
其他提交类型: refactor, perf, workflow, build, CI, typos, tests, types, wip, release, dep
See https://github.com/vuejs/core/blob/main/.github/commit-convention.md
husky - commit-msg hook exited with code 1 (error)
解决方法:
移除本地的 .husky 目录,再执行命令 git commit -m "init" 即可。