Repository navigation
javascript: resolve imports through jsconfig/tsconfig paths aliases - #1749
Merged
Merged
Conversation
….paths aliases
An import spelled through a paths alias ('@/lib/x', '~/models/x') was
UNRESOLVED_MISSING, so a call to a plain imported function came out by
name. The analyzer now reads baseUrl/paths from the nearest tsconfig.json
or jsconfig.json above each file (extends followed) and hands them to the
module resolver. Golden case 70 adds both alias shapes and a control
directory whose nearest config maps nothing.
Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
Co-Authored-By: Claude <noreply@anthropic.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 29, 2026 02:30
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An import through a jsconfig/tsconfig
compilerOptions.pathsalias (@/lib/x,~/models/x) in a JavaScript project was unresolved, so calls to plain imported functions came out[by name]("receiver not typed").baseUrl/pathsfrom the nearesttsconfig.jsonorjsconfig.jsonabove each file (extendsfollowed, no directory listing) and passes them to the module resolver.70-jsconfig-path-alias:@/via jsconfigbaseUrl+paths,~/via a nearer tsconfigpathsonly; control: a directory whose nearest jsconfig maps nothing stays unresolved, and a relative import is unchanged.path aliases resolve through the nearest config.Checked: fixture 1 → 3 known edges (control still unknown, oracle 0 defects); on two real apps (Next-style
@/, Remix~/) 6[by name]callers →[resolved], already-resolved callers unchanged, index time 2.9s → 3.0s. JS golden suite 79/79, parser JS tests 49/49.