Skip to content

Commit

Permalink
fix(linter): do not remap paths that cannot be matched on fix (#10371)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed May 19, 2022
1 parent abdb5df commit 5baaab4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/eslint-plugin-nx/src/rules/enforce-module-boundaries.ts
Expand Up @@ -267,11 +267,13 @@ export default createESLintRule<Options, MessageIds>({
entryPointPath.path,
sourceProject.data.sourceRoot
);

importsToRemap.push({
member: importMember,
importPath: importPath ? entryPointPath.importScope : imp, // we cannot remap, so leave it as is
});
// we cannot remap, so leave it as is
if (importPath) {
importsToRemap.push({
member: importMember,
importPath: entryPointPath.importScope,
});
}
}
}

Expand Down

0 comments on commit 5baaab4

Please sign in to comment.