Skip to content
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

Request: Support Multiple Cases for commit-scope #307

Closed
Undistraction opened this issue Mar 12, 2018 · 3 comments
Closed

Request: Support Multiple Cases for commit-scope #307

Undistraction opened this issue Mar 12, 2018 · 3 comments
Labels

Comments

@Undistraction
Copy link

Current Behavior

Currently it is only possible to choose a single item from the following list:

- '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

However it would be great to be able to choose a subset. For example we would like to restrict scope to either kebab-case or camel-case (because we use function names as scope sometimes). At present our only option is to disable the rule entirely.

Possible Solution

Allow multiple casings to be selected:

"rules": {
    "scope-case": [2, ['camel-case', 'kebab-case']],
  }

This could also apply to type-case and subject-case.

SimeonC pushed a commit to SimeonC/commitlint that referenced this issue Mar 27, 2018
As per issue conventional-changelog#307 port the logic from subject-case for array definitions over to scope-case and type-case.
@SimeonC
Copy link
Contributor

SimeonC commented Mar 27, 2018

I raised a PR to add this feature in for type-case and scope-case, it's already supported in subject-case.

marionebl pushed a commit that referenced this issue May 1, 2018
As per issue #307 port the logic from subject-case for array definitions over to scope-case and type-case.
@SimeonC
Copy link
Contributor

SimeonC commented May 2, 2018

Just to port over the comment from the PR - this is fixed in 6.2.0.

@havenchyk
Copy link

@SimeonC so can it be closed?

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

No branches or pull requests

5 participants