Skip to content

Commit

Permalink
cleanup a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
comp615 committed Dec 5, 2024
1 parent ffe2a7d commit 037e04f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions shared/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ function minimatch(file: string, pattern: string) {

function getMatchedGlobs(file: string, glob: (string | string[])[]) {
const globs = (Array.isArray(glob) ? glob : [glob]).flat()
// Strip leading `!` from globs since they don't mean invert the match condition, but rather unignore
return globs.filter(glob => minimatch(file, glob)).flat()
}

Expand Down Expand Up @@ -53,7 +52,6 @@ export function matchFile(
ignoreOnlyConfigs: FlatConfigItem[],
): MatchedFile {
const globalIgnored = ignoreOnlyConfigs.flatMap(config => filterUnignoreGlobs(getMatchedGlobs(filepath, config.ignores!)))

if (globalIgnored.length) {
return {
filepath,
Expand All @@ -70,7 +68,6 @@ export function matchFile(
configs.forEach((config, index) => {
const positive = getMatchedGlobs(filepath, config.files || [])
const negative = filterUnignoreGlobs(getMatchedGlobs(filepath, config.ignores || []))

if (!negative.length && positive.length)
result.configs.push(index)
result.globs.push(
Expand Down

0 comments on commit 037e04f

Please sign in to comment.