microsoft / microsoft/typespec
Add linter rule or compiler warning for unused imports
Open
design:needed
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
I have seen many typespec files which import packages they don't actually need, like Azure/azure-rest-api-specs-pr#12933 which was importing `@azure-tools/typespec-providerhub-controller`.
Could we add a linter rule or compiler warnings for imports that are not reference in the typespec (or imports that have no typespec exports)?
Contributor guide
Assessment
This issue has not been assessed yet.