Skip to content

Commit 38537d9

Browse files
author
Julius Celik
committed
fix: resolves plugins from extended configs
1 parent 0fbbb47 commit 38537d9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

@commitlint/load/src/load.ts

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Path from 'path';
33
import merge from 'lodash/merge';
44
import mergeWith from 'lodash/mergeWith';
55
import pick from 'lodash/pick';
6+
import union from 'lodash/union';
67
import resolveFrom from 'resolve-from';
78

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

88+
// Read plugins from extends
89+
if (Array.isArray(extended.plugins))
90+
config.plugins = union(config.plugins, extended.plugins || []);
91+
8792
// resolve plugins
8893
if (Array.isArray(config.plugins)) {
8994
config.plugins.forEach(plugin => {

0 commit comments

Comments
 (0)