Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 13, 2022
1 parent 24538bb commit 17c7d58
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions src/config/normalize/lib/wild_wild_path/iterate/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const iterateLevel = function* ({
parents.delete(value)
}

// eslint-disable-next-line complexity
const iterateToken = function* ({ entries, index, parents, opts }) {
const entriesA = expandRecursiveTokens(entries, index)
const entriesB = removeDuplicates(entriesA)
Expand All @@ -54,13 +55,9 @@ const iterateToken = function* ({ entries, index, parents, opts }) {
yield parentEntry
}

yield* iterateChildEntries({
entries: entriesB,
parentEntry,
index,
parents,
opts,
})
if (parentEntry === undefined || entriesB.length !== 1) {
yield* iterateChildEntries({ entries: entriesB, index, parents, opts })
}

if (parentEntry !== undefined && opts.childFirst) {
yield parentEntry
Expand All @@ -79,17 +76,7 @@ const normalizeEntry = function ({ value, path, missing }) {
return { value, path, query, missing }
}

const iterateChildEntries = function* ({
entries,
parentEntry,
index,
parents,
opts,
}) {
if (parentEntry !== undefined && entries.length === 1) {
return
}

const iterateChildEntries = function* ({ entries, index, parents, opts }) {
const childEntries = expandTokens(entries, index, opts.classes)

if (childEntries.length === 0) {
Expand Down

0 comments on commit 17c7d58

Please sign in to comment.