microsoft / microsoft/TypeScript

Typescript: Sort imports in quick fix with imports from node_modules ordered last

Open
#52,872 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs More Info
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

TS Template added by @mjbvz

TypeScript Version: 5.0.1

Search Terms

  • getCodeFixes
  • Code actions
  • quick fix

See screenshot.

The 3rd option is an alias in our project source. The imports from @ag-grid-community/core are from a 3rd party library.

There is no way to ensure that my project's code is prioritised when suggesting what to use, it's driving me nuts.

Screenshot 2023-02-16 at 5 21 07 pm

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

Start by reproducing the quick-fix or code-action import suggestions described in the issue using TypeScript 5.0.1, comparing project-source aliases with imports from @ag-grid-community/core. Trace the getCodeFixes path and determine where import candidates are ordered. Done means project-source imports are prioritized over node_modules imports, with coverage for the reported scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.