0.1.0-alpha.4 • Published 2 years ago

@tawa/commitlint-config v0.1.0-alpha.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@tawa/commitlint-config

tawa commitlint 规则配置, 参考 Commit Message Specification

Install

yarn add -D @tawa/commitlint-config

Configure

// commitlint.config.js
module.exports = {
  extends: ['@tawa/commitlint-config'],
  rules: [
    ...
  ]
}

Rules Config

默认集成了 @tawa/commitlint-plugin-rules 插件以及 @commitlint/config-conventional 规则配置。

  • scope-not-empty: scope 在 type 为 fix、feat 时不能为空
  • scope-case, scope 支持下滑线、横线、大小写格式
{
  'scope-not-empty': [2, 'always'],
  'scope-case': [
    2,
    'always',
    ['lower-case', 'snake-case', 'upper-case', 'kebab-case'],
  ],
  'subject-case': [0]
  ],
}