commitlint sharable configuration files for cz-customizable (customizable Commitizen adapter for conventional commits and conventional changelog).
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.
commitlint-config-cz use only one config in the following order of precedence.
config.cz-customizable.config
inpackage.json
..cz-config.js
in your package root (supported by cz-customizable).
-
Install
commitlint-config-cz
as a local dependency.npm install commitlint-config-cz --save-dev
Extend your commitlint config by cz
in commitlint.config.js
.
module.exports = {
extends: [
'other-config',
'cz'
]
};
commitlint-config-cz includes some modules and API for config conversion.
Gets the converted commitlint config from the cz-customizable config which is defined in package.json
or .cz-config.js
in your package root.
const config = require('commitlint-config-cz/lib/config')();
Gets the commitlint config from a path to config file.
const getConfig = require('commitlint-config-cz/lib/config').get;
// From a path.
const config = getConfig('path/to/.cz-config.js');