You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#496.
When a resolver (e.g., webpack, typescript) resolves an aliased import to a
path outside the current package root but NOT in node_modules (e.g., a monorepo
sibling package), `isExternalPath` previously classified it as 'external'
because any path with a relative prefix of '..' was treated as external. This
caused `no-extraneous-dependencies` to report false positives for these imports.
The fix replaces the blanket "outside package root = external" check in
`isExternalPath` with a more targeted approach:
1. Check if the path is under a configured external-module-folder relative to
the package (preserves existing behavior for local node_modules)
2. For paths outside the package root, check if the external-module-folder
appears as a path segment (catches hoisted deps in monorepos)
Also updates `isInternalPath` to be the logical complement of `isExternalPath`
for resolved paths, so any successfully resolved path that is not in an
external module folder is correctly classified as 'internal'.
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments