git提交时报错not found: commitlint

--全局安装
npm install -g @commitlint/cli


--添加配置文件commitlint.config.js到项目下
module.exports = {
  rules: {
    // 在这里添加你的规则
    // 例如,要求提交消息的长度不超过50个字符
    'header-max-length': [2, 'always', 50]
  },
};

  

posted @ 2023-05-31 10:17  七星飘虫  阅读(301)  评论(0)    收藏  举报