Skip to content
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

report unused Import and have them dimmed #4861

Open
3 tasks done
RodgeFu opened this issue Oct 24, 2024 · 1 comment
Open
3 tasks done

report unused Import and have them dimmed #4861

RodgeFu opened this issue Oct 24, 2024 · 1 comment
Assignees
Labels
design:needed A design request has been raised that needs a proposal ide Issues for VS, VSCode, Monaco, etc.

Comments

@RodgeFu
Copy link
Contributor

RodgeFu commented Oct 24, 2024

Clear and concise description of the problem

There should be warning for unused Import and have them dimmed in IDE

Checklist

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@RodgeFu RodgeFu added the ide Issues for VS, VSCode, Monaco, etc. label Oct 24, 2024
@RodgeFu RodgeFu self-assigned this Oct 24, 2024
@RodgeFu RodgeFu changed the title report unused Import with warning and have them dimmed report unused Import and have them dimmed Nov 6, 2024
@RodgeFu RodgeFu added the design:needed A design request has been raised that needs a proposal label Dec 13, 2024
@RodgeFu
Copy link
Contributor Author

RodgeFu commented Dec 13, 2024

we can't 100% determine whether a "import" is needed based on type reference because lib and emitters can potentially modify type graph in either OnValidate or OnEmit, so without these information, removing "import" may impact the compilation unexpectedly.
Further investigation is needed. Potential solution:

  • Instead of the default way showing unused import, we need find a different way to show these info to end user more accurately so that user can make better judgement (more design needed)
  • Leverage the "type-only" lib feature from compiler when it's ready so that we can 100% sure an import is needed or now.

set pri to P1.5 and we will look into this and double confirm the "type-only" lib feature status after all P1 is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design:needed A design request has been raised that needs a proposal ide Issues for VS, VSCode, Monaco, etc.
Projects
None yet
Development

No branches or pull requests

1 participant