diff --git a/__tests__/resolveConfig.test.js b/__tests__/resolveConfig.test.js index 8aabd8a36..fb8d5edd6 100644 --- a/__tests__/resolveConfig.test.js +++ b/__tests__/resolveConfig.test.js @@ -1468,15 +1468,15 @@ test('plugin config can register plugins that also have config', () => { config: { important: true, }, - handler() {} + handler() {}, }, { config: { separator: '__', }, - handler() {} + handler() {}, }, - ] + ], }, handler() {}, }, @@ -1530,9 +1530,9 @@ test('plugin configs take precedence over plugin configs registered by that plug config: { prefix: 'inner-', }, - handler() {} - } - ] + handler() {}, + }, + ], }, handler() {}, }, diff --git a/src/index.js b/src/index.js index e5db638ba..9dd2ab582 100644 --- a/src/index.js +++ b/src/index.js @@ -56,7 +56,7 @@ const getConfigFunction = config => () => { } const configObject = _.isObject(config) ? _.get(config, 'config', config) : require(config) - + return resolveConfig([configObject, defaultConfig]) } diff --git a/src/util/resolveConfig.js b/src/util/resolveConfig.js index 1ab7b4b66..be2c64762 100644 --- a/src/util/resolveConfig.js +++ b/src/util/resolveConfig.js @@ -1,6 +1,5 @@ import some from 'lodash/some' import mergeWith from 'lodash/mergeWith' -import isEmpty from 'lodash/isEmpty' import isFunction from 'lodash/isFunction' import isUndefined from 'lodash/isUndefined' import defaults from 'lodash/defaults' @@ -102,7 +101,7 @@ function extractPluginConfigs(configs) { allConfigs = [...allConfigs, config] const plugins = get(config, 'plugins', []) - + if (plugins.length === 0) { return }