Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lxow456 opened this issue May 1, 2022 · 2 comments · Fixed by #3179
Closed

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

lxow456 opened this issue May 1, 2022 · 2 comments · Fixed by #3179

Comments

@lxow456
Copy link
Contributor

lxow456 commented May 1, 2022

 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.

@escapedcat
Copy link
Member

I'm not sure why the docs/readme would be different from the conventional-config readme.
Without any config you need to write your own config anyways. So there's no commitlint-"default".

Happy for a PR. Thanks!

lxow456 added a commit to lxow456/commitlint that referenced this issue May 14, 2022
Update the scope-case rule in docs/reference-rules and config-conventional/README to be same.
escapedcat pushed a commit that referenced this issue May 15, 2022
Update the scope-case rule in docs/reference-rules and config-conventional/README to be same.
@lxow456
Copy link
Contributor Author

lxow456 commented May 15, 2022

😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants