You can now consistently manage your commit types/scopes for cz-customizable and commitlint in one place.
commitlint-config-cz merges{types,scopes,scopeOverrides} (cz-customizable config) with
rules.{type-enum,scope-enum} (commitlint config) and includes some modules and API for config conversion.
Supported Config
commitlint-config-cz use only one config in the following order of precedence.
const getConfig = require('commitlint-config-cz/lib/config').get;const czConfig = { /* `cz-customizable` config object. */ };const defaultConfig = { // The default `commitlint` config. rules: { 'scope-enum': [ // rule 2, // [1] level 'always', // [2] applicability [], // [3] value ], 'type-enum' : [ // rule 2, // [1] level 'always', // [2] applicability [], // [3] value ], },};// Converts and merges the `cz-customizable` config with the default `commitlint` config.
If cz-customizable config has scopes, scopeOverrides or types field,
the value(s) [3] of the default commitlint config is/are REPLACED by converted value(s).
Level [1] and applicability [2] remain as they are.
scope-enum rule or/and type-enum rule is/are REMOVED, if its value is an empty array.
cz-config.js
Gets the cz-customizable config as an object from package.json or .cz-config.js in your package root.