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

cz-commitlint: Multiple scopes cannot be disabled when using scope-enum #2896

Closed
CJKay opened this issue Dec 2, 2021 · 2 comments
Closed

Comments

@CJKay
Copy link
Contributor

CJKay commented Dec 2, 2021

#2782 introduced support for multiple scopes (e.g. feat(abc,xyz): ...), and with it changed the format of the scope selection prompt in cz-commitlint from a single-select radio list to a multiple-select checkbox list when the scope-enum rule has been configured.

However, not all projects that use the scope-enum rule wish to enable multiple scopes (to prevent duplicate entries in the changelog under distinct sub-sections, for example). At present, there's no option to configure whether commitlint (and Commitizen when using cz-commitlint) permits multiple scopes.

Expected Behavior

commitlint should introduce a new configuration option (multiple-scopes?) to configure whether multiple scopes are supported. When multiple-scopes are disabled, usage of multiple scopes should cause an error during linting, and cz-commitlint should present the user with a radio list instead of a checkbox list.

Current Behavior

There is no option to configure support for multiple scopes, so cz-commitlint always presents a checkbox list and always accepts multiple scopes if scope-enum is configured.

@CJKay CJKay changed the title Multiple scopes cannot be disabled Multiple scopes cannot be disabled when using scope-enum Dec 2, 2021
@curly210102
Copy link
Contributor

@CJKay Thanks for feedback, I'll add option to config it.

@escapedcat escapedcat changed the title Multiple scopes cannot be disabled when using scope-enum cz-commitlint: Multiple scopes cannot be disabled when using scope-enum Dec 9, 2021
@escapedcat
Copy link
Member

Released with v16.0.0

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

No branches or pull requests

3 participants