-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Suggestion: Show unused imports in VS Code Editor as grayed #8165
Comments
@BBGONE have you tried to use tslint and corresponding editor plugin? It can highlight unused imports. |
@s-panferov Thanks, i did not try, yet. It will be very helpful in my case. |
I think this would be solved if |
in fact noUnusedParameters and noUnusedLocals behave very rough.
where the s parameter is not used, but it's not an error. I can not remove it because it's the function's signature and is required, and it's not the last parameter which i can not simply ommit. |
Regarding:
Yeah, that's why it should be warning and not an error. (And maybe not even a warning in this case.) By the way you can "fix" this by writing |
Though, version 1.19 underlines unused symbols in the imports now I wish the entire import was greyed out similar to other IDEs. That would make such imports easier to spot. |
@andy-ms this is related to the non-error suggestions feature. |
any progress on this? |
I am looking forward this feature too |
now, for me it's all ok when unused imports is an error. If there's an error, i just remove the unused import. |
We would rather have it as a grayed warning. Errors break the build. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just merged in support for this into VS Code: microsoft/vscode#15710 Should be in tomorrows VS Code insiders. It is controlled by the settings: "javascript.showUnused.enabled": true,
"typescript.showUnused.enabled": true, |
@mjbvz when it will be published for all? |
I do a refactory of a large project. I split large modules into smaller ones.
So when i move imports to a new module i want to remove unused imports.
This can not be done easily as i click in context menu "Find All references" it shows all the references in the current project - "it is very unuseful i admit".
So, if it is by design, then this problem can be ameliorated by showing unused imports as grayed.
The text was updated successfully, but these errors were encountered: