Skip to content

Commit e415653

Browse files
committed
Return when the import path cannot be resolved
1 parent 387d072 commit e415653

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/eslint-plugin-slow-imports/lib/rules/no-top-level-external-import.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = {
5757
function visitor(filename, originalNode, node) {
5858
const modulePath = node.value;
5959
if (ignoreModules.has(modulePath) || isBuiltin(modulePath)) {
60-
return {};
60+
return;
6161
}
6262

6363
function detectTopLevelExternalDependency(path) {
@@ -93,10 +93,11 @@ module.exports = {
9393
node: originalNode,
9494
messageId: "CANNOT_RESOLVE_MODULE",
9595
});
96+
return;
9697
}
9798

9899
if (traversed.has(absoluteModulePath)) {
99-
return {};
100+
return;
100101
}
101102

102103
traversed.add(absoluteModulePath);

0 commit comments

Comments
 (0)