Commitlint - 允许在范围枚举中使用“/”

问题描述

在我的 Angular 项目中,我想使用一些预定义的 @commitlint/config-conventional 扩展 scopes

Angular 项目有一个用于 UI 组件的(通过 ng generate library 生成)和一个使用 UI 库的认应用。

commitlint.config.js 中,我添加了以下几行:

module.exports = {
  extends: ['@commitlint/config-conventional'],rules: {
    'scope-enum': [
        2,'always',[
          'ui-components','ui-components/badge','ui-components/button','ui-components/tooltip','core','account','plugins','settings','projects','shared','styles'
        ]
    ]
  }
};

但是,当我尝试使用范围提交某些内容时:'ui-components/tooltip'

fix(ui-components/tooltip): fix border

我收到一个 commitlint 错误,说:

⧗   input: fix(ui-components/tooltip): fix border
✖   scope must be one of [ui-components,ui-components/badge,ui/button,ui-components/tooltip,core,account,plugins,settings,projects,shared,styles] [scope-enum]

✖   found 1 problems,0 warnings

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)