Skip to content

Commit

Permalink
Merge pull request #4205 from ci-vamp/eslint-patch-invalid-importer-path
Browse files Browse the repository at this point in the history
[eslint-patch] add invalid importer path test to ESLint 7.x || 8.x block
  • Loading branch information
octogonz committed Jun 14, 2023
2 parents b98ab21 + 82f90a4 commit 4c48551
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/eslint-patch",
"comment": "[eslint-patch] add invalid importer path test to ESLint 7.x || 8.x block",
"type": "patch"
}
],
"packageName": "@rushstack/eslint-patch"
}
2 changes: 1 addition & 1 deletion eslint/eslint-patch/src/modern-module-resolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ if (!ConfigArrayFactory.__patched) {
// resolve using ctx.filePath instead of relativeToPath
return originalResolve.call(this, moduleName, ctx.filePath);
} catch (e) {
if (isModuleResolutionError(e)) {
if (isModuleResolutionError(e) || isInvalidImporterPath(e)) {
return originalResolve.call(this, moduleName, relativeToPath);
}
throw e;
Expand Down

0 comments on commit 4c48551

Please sign in to comment.