microsoft / microsoft/TypeScript

Don't provide suggestions for certain global packages

Open
#44,499 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: LS: Completion Lists Needs Proposal Suggestion
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

If you have @types/node installed, you shouldn't get a completion item for node when typing import "n.

It's unclear what the right thing to do here is. I don't think you always want to filter out non-module packages because a package might just be written in a weird way where you import it and all it does is introduce globals. At the very least, we could do some quick-and-dirty filtering.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by reproducing completion for import "n with @types/node installed, then trace the language-service completion entry point that offers node. Done means defining and testing a safe rule for filtering packages that only introduce globals without hiding valid imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.