Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Feb 20, 2022
1 parent 848cd12 commit fd54b03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
20 changes: 0 additions & 20 deletions src/config/plugin/lib/list.js

This file was deleted.

5 changes: 3 additions & 2 deletions src/config/plugin/lib/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { normalizeOptionalArray } from '../../normalize/transform.js'

import { validateDuplicatePlugins } from './duplicates.js'
import { UserError } from './error.js'
import { getPluginInfo } from './info.js'
import { normalizeList } from './list.js'
import { normalizeMultipleOpts, normalizeSingleOpts } from './options.js'

// Generic utility to add plugins which can be selected and configured by users.
Expand All @@ -20,7 +21,7 @@ export const getPlugins = async function (pluginConfigs, opts) {
const optsA = normalizeMultipleOpts(opts)
validateDefined(pluginConfigs, optsA)
const isArray = Array.isArray(pluginConfigs)
const pluginConfigsA = await normalizeList(pluginConfigs, optsA)
const pluginConfigsA = normalizeOptionalArray(pluginConfigs)
const pluginInfos = await Promise.all(
pluginConfigsA.map((pluginConfig, index) =>
getEachPluginInfo(pluginConfig, optsA, { isArray, index }),
Expand Down

0 comments on commit fd54b03

Please sign in to comment.