We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
matchGlobs
1 parent b631b47 commit aca84d2Copy full SHA for aca84d2
src/core/utils.ts
@@ -58,8 +58,10 @@ export function isEmpty(value: any) {
58
59
export function matchGlobs(filepath: string, globs: string[]) {
60
for (const glob of globs) {
61
- if (minimatch(slash(filepath), glob))
62
- return true
+ const isNegated = glob.startsWith('!')
+ const match = minimatch(slash(filepath), isNegated ? glob.slice(1) : glob)
63
+ if (match)
64
+ return !isNegated
65
}
66
return false
67
0 commit comments