Skip to content

Commit

Permalink
fix(load): loads plugins from extended configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Julius Celik committed Jun 26, 2020
1 parent 1cc4755 commit bca2c51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions @commitlint/load/src/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Path from 'path';
import merge from 'lodash/merge';
import mergeWith from 'lodash/mergeWith';
import pick from 'lodash/pick';
import union from 'lodash/union';
import resolveFrom from 'resolve-from';

import executeRule from '@commitlint/execute-rule';
Expand Down Expand Up @@ -84,6 +85,10 @@ export default async function load(
resolveFrom.silent(base, config.formatter) || config.formatter;
}

// Read plugins from extends
if (Array.isArray(extended.plugins))
config.plugins = union(config.plugins, extended.plugins || []);

// resolve plugins
if (Array.isArray(config.plugins)) {
config.plugins.forEach(plugin => {
Expand Down

0 comments on commit bca2c51

Please sign in to comment.