-
Notifications
You must be signed in to change notification settings - Fork 39
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
Implement "no-unused-import" rule #118
base: master
Are you sure you want to change the base?
Conversation
Diagnostics are now created independent of the order of import statements. |
This looks awesome @FelixSchuSi !! In order for you to test the VSCode plugin, you will have to run Be aware that I recently merged Have you thought about having a |
Thank you for your help @runem! |
…' rule; Current impl breaks nothing.
… different import statement.
…newlines when removing import statement.
Hey @runem, I implemented all changes I had planned, here are some things you might want to look at:
|
@FelixSchuSi @runem Is it possible to get this rule merged in? This would be really useful, especially when used in conjunction with |
I have tried to implement a
"no-unused-import"
rule and so far it has been going great.This is still work in progress — I have included a checklist at the bottom showing all the changes that need to be done.
An import statement is unused, when none of the component definitions that were loaded by this import statement are used.
The dependency traversal now collects information about the import statement that triggered loading a component definition and stores this information in the
dependencyStore
.Currently, only side effect only imports (e. g.:
import "./my-module"
) are evaluated.TODO