refactor: use Object.entries rather than Object.keys
				
					
				
			This commit is contained in:
		
							parent
							
								
									50061bb267
								
							
						
					
					
						commit
						eb26254b00
					
				@ -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 => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user