biomejs / biome-vscode

Biome extension for Visual Studio Code and VSCodium
https://marketplace.visualstudio.com/items?itemName=biomejs.biome
Apache License 2.0
237 stars 32 forks source link

🐛 The import sorter remove unused imports. #345

Open cjg1122 opened 2 months ago

cjg1122 commented 2 months ago

VS Code version

1.93.1

Extension version

2.3.0

Biome version

1.9.0

Operating system

Description

The documentation mentions The import sorter doesn’t remove unused imports. We provide the linter rule noUnusedImports with a safe fix that removes unused imports.

as a matter of fact The import sorter remove unused imports.

Steps to reproduce

 "editor.codeActionsOnSave": {
    "quickfix.biome": "explicit",
    "source.organizeImports": "explicit"
  },

cmd+s

Expected behavior

Consistent with documentation or configurable

Does this issue occur when using the CLI directly?

Not applicable

Link to a minimal reproduction

No response

Logs

No response

cjg1122 commented 2 months ago

@nhedger When I cli the pnpm check import a from ‘. /a" wasn't deleted, but it was deleted when I saved it with cmd +s.

https://github.com/user-attachments/assets/2049db6b-b63e-4a77-8058-2d7c41a572cc