Skip to content

Commit 4c48551

Browse files
authored
Merge pull request #4205 from ci-vamp/eslint-patch-invalid-importer-path
[eslint-patch] add invalid importer path test to ESLint 7.x || 8.x block
2 parents b98ab21 + 82f90a4 commit 4c48551

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/eslint-patch",
5+
"comment": "[eslint-patch] add invalid importer path test to ESLint 7.x || 8.x block",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@rushstack/eslint-patch"
10+
}

eslint/eslint-patch/src/modern-module-resolution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ if (!ConfigArrayFactory.__patched) {
238238
// resolve using ctx.filePath instead of relativeToPath
239239
return originalResolve.call(this, moduleName, ctx.filePath);
240240
} catch (e) {
241-
if (isModuleResolutionError(e)) {
241+
if (isModuleResolutionError(e) || isInvalidImporterPath(e)) {
242242
return originalResolve.call(this, moduleName, relativeToPath);
243243
}
244244
throw e;

0 commit comments

Comments
 (0)