When using the rule scope-enum, @commitlint/prompt and @commitlint/cz-commitlint render the question as a list from which only one answer can be selected.
However, the rule scope-enum allows multiple values separated with a comma, back slash and/or forward slash
Expected Behavior
If the rule scope-enum is found in the config, the type of the question should be "checkbox" so multiple values can be selected.
Current Behavior
if the rule scope-enum is found in the config, the type of the question is "list" and only one value can be selected.
Affected packages
Possible Solution
From what I understand "inquirer" is used to render the question. So if the rule scope-enum is found in the config, the type of the question should be "checkbox".
Steps to Reproduce (for bugs)
- Add scope-enum as a rule in the rules section of the commitlint config.
- Use @commitlint/prompt or @commitlint/cz-commitlint to render the question
Context
No being able to select multiple values for scope, forced me to duplicate the rule scope-enum and name it scope-choice so that the question is rendered as a question of type "text" instead of "list".
Your Environment
| Executable |
Version |
commitlint --version |
13.2.0 |
git --version |
2.31.0 |
node --version |
14.17.0 |
When using the rule scope-enum, @commitlint/prompt and @commitlint/cz-commitlint render the question as a list from which only one answer can be selected.
However, the rule scope-enum allows multiple values separated with a comma, back slash and/or forward slash
Expected Behavior
If the rule scope-enum is found in the config, the type of the question should be "checkbox" so multiple values can be selected.
Current Behavior
if the rule scope-enum is found in the config, the type of the question is "list" and only one value can be selected.
Affected packages
Possible Solution
From what I understand "inquirer" is used to render the question. So if the rule scope-enum is found in the config, the type of the question should be "checkbox".
Steps to Reproduce (for bugs)
Context
No being able to select multiple values for scope, forced me to duplicate the rule scope-enum and name it scope-choice so that the question is rendered as a question of type "text" instead of "list".
Your Environment
commitlint --versiongit --versionnode --version