@6river/commitlint-config-6river

Customized version of @commitlint/config-conventional.

@6river/commitlint-config-6river

Extends @commitlint/config-conventional.

Shareable commitlintconfig enforcing conventional commits. Use with @commitlint/cliand @commitlint/prompt-cli.

Getting started

npm install --save-dev @commitlint/config-conventional @commitlint/cli
echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js

Rules

Problems

The following rules are considered problems for @commitlint/config-conventionaland will yield a non-zero exit code when not met.

Consult docs/rulesfor a list of available rules.

type-enum

  • condition: typeis found in value

  • rule: always

  • value

    [
      'build',
      'ci',
      'chore',
      'docs',
      'feat',
      'fix',
      'perf',
      'refactor',
      'revert',
      'style',
      'test'
    ]
echo "foo: some message" # fails
echo "fix: some message" # passes

type-case

  • description: typeis in case value
  • rule: always
  • value
    'lowerCase'
echo "FIX: some message" # fails
echo "fix: some message" # passes

type-empty

  • condition: typeis empty
  • rule: never
echo ": some message" # fails
echo "fix: some message" # passes

scope-case

  • condition: scopeis in case value
  • rule: always
    'lowerCase'
echo "fix(SCOPE): some message" # fails
echo "fix(scope): some message" # passes

subject-case

  • condition: subjectis in one of the cases ['sentence-case', 'start-case', 'pascal-case', 'upper-case']
  • rule: never
echo "fix(SCOPE): Some message" # fails
echo "fix(SCOPE): Some Message" # fails
echo "fix(SCOPE): SomeMessage" # fails
echo "fix(SCOPE): SOMEMESSAGE" # fails
echo "fix(scope): some message" # passes
echo "fix(scope): some Message" # passes

subject-empty

  • condition: subjectis empty
  • rule: never
echo "fix:" # fails
echo "fix: some message" # passes

subject-full-stop

  • condition: subjectends with value
  • rule: never
  • value
    '.'
echo "fix: some message." # fails
echo "fix: some message" # passes

header-max-length

  • condition: headerhas valueor less characters
  • rule: always
  • value
    72
echo "fix: some message that is way too long and breaks the line max-length by several characters" # fails
echo "fix: some message" # passes

HomePage

https://github.com/6RiverSystems/commitlint-config-6river#readme

Repository

https+https://github.com/6RiverSystems/commitlint-config-6river


上一篇:@adfinis-sygroup/semantic-release-config
下一篇:@1stg/commitlint-config

相关推荐

官方社区

扫码加入 JavaScript 社区