Skip to content

Commit

Permalink
refactor: use Object.entries rather than Object.keys
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Jul 10, 2018
1 parent 50061bb commit eb26254
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/get-config.js
Expand Up @@ -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 => {
Expand Down

0 comments on commit eb26254

Please sign in to comment.