From eb26254b009e6793a2283aa4652e519148d01dd2 Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Sat, 7 Jul 2018 03:49:34 -0400 Subject: [PATCH] refactor: use `Object.entries` rather than `Object.keys` --- lib/get-config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/get-config.js b/lib/get-config.js index 1937c546..24560876 100644 --- a/lib/get-config.js +++ b/lib/get-config.js @@ -34,9 +34,9 @@ module.exports = async (opts, logger) => { // For each plugin defined in a shareable config, save in `pluginsPath` the extendable config path, // so those plugin will be loaded relatively to the config file - Object.keys(extendsOpts).reduce((pluginsPath, option) => { + Object.entries(extendsOpts).reduce((pluginsPath, [option, value]) => { if (PLUGINS_DEFINITIONS[option]) { - castArray(extendsOpts[option]) + castArray(value) .filter(plugin => isString(plugin) || (isPlainObject(plugin) && isString(plugin.path))) .map(plugin => (isString(plugin) ? plugin : plugin.path)) .forEach(plugin => {