Skip to content

Commit 5b17f8e

Browse files
committed
refactor: exit loop when get the match result
1 parent 54d7b74 commit 5b17f8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rules/folder-match-with-fex.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = {
4242
if (!micromatch.isMatch(filename, fexPattern)) {
4343
continue;
4444
} else if (micromatch.isMatch(folder, folderPattern)) {
45-
continue;
45+
return;
4646
} else {
4747
context.report({
4848
node,
@@ -53,6 +53,7 @@ module.exports = {
5353
folderPattern,
5454
},
5555
});
56+
return;
5657
}
5758
}
5859
},

0 commit comments

Comments
 (0)