microsoft / microsoft/TypeScript
Organize Import removes React import on React JS files
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.96.0
- OS Version: Windows_NT x64 10.0.22631
Version: 1.96.0 (user setup)
Commit: 138f619c86f1199955d53b4166bef66ef252935c
Date: 2024-12-11T02:29:09.626Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631
Steps to Reproduce:
- Open a JS file containing a React import
- Have Organize Imports as a code action on save
- See the React import get removed, despite it being used
Looks like this got re-introduced in latest update microsoft/vscode#47287
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Organize Imports code action on save with a JavaScript file containing a used React import, using the reported VS Code and TypeScript context. Compare the behavior with the referenced microsoft/vscode#47287 issue; done means Organize Imports preserves React imports that are used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100