-
-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Broken useImportType fix when "quickfix.biome": "explicit" is enabled #2268
Comments
@Sec-ant , was it supposed to be fixed in 1.6.4? While it's certainly better now, the code above is still broken after format import type fs from "fs";
import { type BigIntOptions, lchownSync }type from "fs";
import { type Blob, type File, } from "buffer"
const a: fs;
const b: BigIntOptions;
const c: lchownSync;
const d: Blob;
const e: File; |
I added a demo to show this is fixed in #2237. I don't see any issues when |
Wait, I can reproduce the issue... I don't know why it works well on that PR branch... please give me some time to debug. 😢 |
Thank you! |
VS Code version
1.87.2
Extension version
2,2,2
Biome version
1.6.3
Operating system
Description
When there are many type imports, autofix on save in vscode can be buggy
Steps to reproduce
When
useImportType
rule is enabled, and vscode extension is configured with "quickfix.biome": "explicit", try to edit following code:The result will be
You can continue pressing ctrl+s, and the code will become more and more broken. The issue seems to be exacerbated the more you mix imports that are supposed to be types and are not supposed to be them.
Expected behavior
Cli seems to be applying type to imports correctly. Vscode extension should behave like cli
Does this issue occur when using the CLI directly?
No
Logs
No response
The text was updated successfully, but these errors were encountered: