Skip to content

Commit

Permalink
fix(linter): make entry point check for ts paths more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed May 18, 2022
1 parent 70f1a6b commit 446f659
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/eslint-plugin-nx/src/utils/ast-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ export function getBarrelEntryPointProjectNode(
.filter((entry) => {
const sourceFolderPaths = tsConfigBase.compilerOptions.paths[entry];
return sourceFolderPaths.some((sourceFolderPath) => {
return sourceFolderPath.includes(importScope.data.root);
return (
sourceFolderPath === importScope.data.root ||
sourceFolderPath.indexOf(`${importScope.data.root}/`) === 0
);
});
})
.map((entry) =>
Expand Down

0 comments on commit 446f659

Please sign in to comment.