Skip to content

tsp format should clean up unused imports #9148

@baywet

Description

@baywet

Clear and concise description of the problem

If I have the following two typspec files

main.tsp

import "./models.tsp";

model Foo {
  bar: String
}

models.tsp

model Bun {
  prop: String
}

I'd expect the tsp format command to clean up the unused import in the main file. Currently it does not.

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions