Skip to content

Commit

Permalink
feat(config): add 'extends' configuration option
Browse files Browse the repository at this point in the history
Give users the option to extend Options with a deep merge with the object inside the "extends"
configuration option

fix commitizen#145
  • Loading branch information
oscard0m committed Nov 27, 2021
1 parent c3f210c commit 315be5e
Show file tree
Hide file tree
Showing 3 changed files with 9,487 additions and 39 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
var engine = require('./engine');
var conventionalCommitTypes = require('conventional-commit-types');
var configLoader = require('commitizen').configLoader;
var merge = require('lodash.merge');
var chalk = require('chalk');

var config = configLoader.load() || {};
var options = {
Expand All @@ -28,6 +30,10 @@ var options = {
100
};

if (!!config.extends) {
options = merge(options, config.extends);
}

(function(options) {
try {
var commitlintLoad = require('@commitlint/load');
Expand Down
Loading

0 comments on commit 315be5e

Please sign in to comment.