I want to be able to add scopes the ones picked up by @commitlint/config-lerna-scopes
Add additional scopes to @commitlint/config-lerna-scopes
Complains when I try to add scopes to the scope-enum rule while using @commitlint/config-lerna-scopes.
@commitlint/config-lerna-scopesscope-enum| Executable | Version |
| ---: | :--- |
| commitlint --version | VERSION |
| git --version | VERSION |
| node --version | VERSION |
commitlint does not automatically concat the scope arrays provided by extended config and the toplevel config found in your commitlint.config.js but overrides extended rule config fully.
You can concat explicity like this:
// commitlint.config.js
const {utils: {getPackages}} = require('@commitlint/config-lerna-scopes');
module.exports = {
rules: {
'scope-enum': async ctx =>
[2, 'always', [...(await getPackages(ctx)), 'your', 'other', 'scopes']]
}
}
@marionebl Thanks!
Most helpful comment
commitlintdoes not automatically concat the scope arrays provided by extended config and the toplevel config found in yourcommitlint.config.jsbut overrides extended rule config fully.You can concat explicity like this: