Skip to content

Commit 7c42612

Browse files
committed
feat(config): add 'extends' configuration option
Give users the option to extend Options with a deep merge with the object inside the "extends" configuration option fix #145
1 parent c3f210c commit 7c42612

File tree

3 files changed

+9486
-39
lines changed

3 files changed

+9486
-39
lines changed

index.js

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
var engine = require('./engine');
44
var conventionalCommitTypes = require('conventional-commit-types');
55
var configLoader = require('commitizen').configLoader;
6+
var merge = require('lodash.merge');
67

78
var config = configLoader.load() || {};
89
var options = {
@@ -28,6 +29,10 @@ var options = {
2829
100
2930
};
3031

32+
if (!!config.extends) {
33+
options = merge(options, config.extends);
34+
}
35+
3136
(function(options) {
3237
try {
3338
var commitlintLoad = require('@commitlint/load');

0 commit comments

Comments
 (0)