You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When extending multiple configurations, whether local or package-based, the scope-enum option does not concatenate the scope-enum options from every extended configuration. I am unsure if this is intentional behaviour of commitlint.
Expected Behavior
When using the extends configuration option, the scope-enum sub option concatenates or merges all imported configs.
Current Behavior
When using the extends configuration option, the scope-enum sub option does not concatenate and only the left-most array item in the extends value has their scope-enum sub option resolved.
Affected packages
cli
core
config-lerna-scopes
resolve-extends
Possible Solution
Depending on the intent of commitlint, the answer lies somewhere in resolve-extends. I'd be happy to contribute in any case.
I am a maintainer of the telus/tds-core repository that uses lerna, and @commitlint/config-lerna-scopes. My goal is to set up custom scopes as well as the scopes gathered by config-lerna-scopes, but concatenation has become an issue.
As a workaround, I concatenated my scopes manually by using the @commitlint/config-lerna-scopes package API, but this is a brittle solution since it is not meant to be used this way. Importing scopes using @commitlint/config-lerna-scopes@7.0.0 is synchronous, and @commitlint/config-lerna-scopes@7.2.1 is asynchronous. I want to make proper use of extends or @commitlint/load.
If this non-concatenation behaviour of extends is a bug, then resolving the bug and using extends for conatenating options may be the best solution.
Your Environment
Executable
Version
commitlint --version
7.2.1
git --version
2.19.2
node --version
8.11.3
The text was updated successfully, but these errors were encountered:
Thank you for maintaining commitlint.
When extending multiple configurations, whether local or package-based, the
scope-enum
option does not concatenate thescope-enum
options from every extended configuration. I am unsure if this is intentional behaviour of commitlint.Expected Behavior
When using the
extends
configuration option, thescope-enum
sub option concatenates or merges all imported configs.Current Behavior
When using the
extends
configuration option, thescope-enum
sub option does not concatenate and only the left-most array item in theextends
value has theirscope-enum
sub option resolved.Affected packages
Possible Solution
Depending on the intent of commitlint, the answer lies somewhere in
resolve-extends
. I'd be happy to contribute in any case.Steps to Reproduce (for bugs)
Here is a minimal example using only local configs: https://repl.it/@EnricoSacchetti/Commitlint-Extends-concatenation
To reproduce:
Sample output:
Context
I am a maintainer of the telus/tds-core repository that uses lerna, and
@commitlint/config-lerna-scopes
. My goal is to set up custom scopes as well as the scopes gathered byconfig-lerna-scopes
, but concatenation has become an issue.As a workaround, I concatenated my scopes manually by using the
@commitlint/config-lerna-scopes
package API, but this is a brittle solution since it is not meant to be used this way. Importing scopes using@commitlint/config-lerna-scopes@7.0.0
is synchronous, and@commitlint/config-lerna-scopes@7.2.1
is asynchronous. I want to make proper use ofextends
or@commitlint/load
.If this non-concatenation behaviour of
extends
is a bug, then resolving the bug and usingextends
for conatenating options may be the best solution.Your Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: