Skip to content

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Mar 20, 2025

For example, if someone has "$src/": "./src" in their import map, this will no longer show a diagnostic when someone imports "./a.ts" from ./src/b.ts`

Closes #17867

if entry.raw_value == Some("./") {
// ignore `./` entries because it creates a
// diagnostic for every relative import
continue;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed the test fails without this.

@dsherret dsherret marked this pull request as ready for review March 20, 2025 14:15
@dsherret dsherret changed the title fix(lsp): do not show import-map-remap diagnostic for entries with a ./ value fix(lsp): do not show import-map-remap diagnostic when referrer and target are within the entry base Mar 20, 2025
@dsherret dsherret requested a review from nayeemrmn March 20, 2025 14:34
Copy link
Contributor

@nayeemrmn nayeemrmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dsherret dsherret merged commit 60b502d into denoland:main Mar 20, 2025
18 checks passed
@dsherret dsherret deleted the fix_lsp_ignore_import_map_remap_dot_slash_key branch March 20, 2025 15:20
ry pushed a commit that referenced this pull request Mar 21, 2025
…arget are within the entry base (#28560)

For example, if someone has `"$src/": "./src"` in their import map, this
will no longer show a diagnostic when someone imports `"./a.ts"` from
./src/b.ts`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[lsp] deno.jsonc option to disable import-map-remap
2 participants