-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
🐛 fix of lint/nursery/noUnusedImports
does not work correctly
#688
Comments
Can I work on this issue? |
@TaKO8Ki Yes! I assigned. |
@TaKO8Ki Are you still interest in? Otherwise, I would like to fix the issue :) |
@Conaclos I have already identified the cause and just need to make the correction, but I haven't had time to work on it recently and have left it unattended. Could I have another 2-3 days? The issue is with the consecutive application of autofix. For example, when applying an autofix consecutively to remove the spans of
The |
No urgencies, take your time :) All yours :) |
Not sure if this is the same issue, but something similar also happens with separate imports: import { func1 } from "./func1";
import { func2 } from "./func2";
import { func3 } from "./func3";
import { func4 } from "./func4";
func2(); is auto fixed to import { func2 } from "./func2";
import { func3 } from "./func3";
import { |
#1015 could be related to the current issue. |
@TaKO8Ki are you still interested? |
@ematipico I will push my WIP implementation later! |
When i try below two case
and
This two case work fine but this issue case could lead to the deletion of a large amount of code during formatting.
How about disabling noUnusedImports when the syntax is invalid? |
Isn't there a biome setting to disable formatting with errors? |
Environment information
What happened?
I have unused imports in my file. Here,
ToolbarAction
andcreateOverflowMenuAction
are not used.When saving this file with the settings:
the result is:
Expected result
The result should be:
Code of Conduct
The text was updated successfully, but these errors were encountered: