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.
Minimatch.match
minimatch
1 parent 5db5ae5 commit 4392f46Copy full SHA for 4392f46
src/rules/no-restricted-paths.js
@@ -3,7 +3,7 @@ import path from 'path';
3
import resolve from 'eslint-module-utils/resolve';
4
import moduleVisitor from 'eslint-module-utils/moduleVisitor';
5
import isGlob from 'is-glob';
6
-import { Minimatch, default as minimatch } from 'minimatch';
+import { Minimatch } from 'minimatch';
7
import docsUrl from '../docsUrl';
8
import importType from '../core/importType';
9
@@ -83,7 +83,8 @@ module.exports = {
83
84
function isMatchingTargetPath(filename, targetPath) {
85
if (isGlob(targetPath)) {
86
- return minimatch(filename, targetPath);
+ const mm = new Minimatch(targetPath);
87
+ return mm.match(filename);
88
}
89
90
return containsPath(filename, targetPath);
0 commit comments