Skip to content

The configuration of subject-case is inconsistent in different README #3159

Closed
@lxow456

Description

@lxow456

 I'm learning about the configuration of some rules. And I found subject-case's configuration is inconsistent in different README.md.

Expected Behavior

 According to @commitlint/config-conventional/index.js, the default values of subject-case are ['sentence-case', 'start-case', 'pascal-case', 'upper-case'].

Current Behavior

 In docs/reference-rules.md:
image

 And In @commitlint/config-conventional/README.md:
image

 The condition, rule and value are inconsistent.

Possible Solution

 I have a suggestion to modify these two files as follows:
docs/reference-rules.md

subject-case

  • condition: subject is in one of the cases ['sentence-case', 'start-case', 'pascal-case', 'upper-case']
  • rule: always
  • value:
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
  • possible values:
[
  'lower-case', // default
  'upper-case', // UPPERCASE
  'camel-case', // camelCase
  'kebab-case', // kebab-case
  'pascal-case', // PascalCase
  'sentence-case', // Sentence case
  'snake-case', // snake_case
  'start-case' // Start Case
]

@commitlint/config-conventional/README.md:

subject-case

  • condition: subject is in one of the cases ['sentence-case', 'start-case', 'pascal-case', 'upper-case']
  • rule: always
  • level: error

Your Environment

Executable Version
commitlint --version 16.2.4
git --version 2.28.0
node --version 14.7.0

Can I send PR for this? Thanks for taking note of this question.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions