diff --git a/shared/configs.ts b/shared/configs.ts index 8415ca0..755d91a 100644 --- a/shared/configs.ts +++ b/shared/configs.ts @@ -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() } @@ -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, @@ -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(