0

I prefer to use Visual Studio as my single IDE and not switch to Visual Studio Code like a lot of my colleagues does for front end development. One thing that I truly miss is Visual Studio Code Organize imports.

Is there a way to remove unused imports and declarations from Angular 2+?

I can achieve this in C# files for unused using namespaces using default code cleanup but I have not found anything that does it for .ts and .tsx files.

https://stackoverflow.com/a/62022243/3850405

Is there any good way to achieve this?

Ogglas
  • 62,132
  • 37
  • 328
  • 418

1 Answers1

0

Sometimes you have to look twice, you could simply right click and press Organize Imports

enter image description here

Original shortcut is Ctrl+R, Ctrl+G.

Source:

https://stackoverflow.com/a/52270676/3850405

Ogglas
  • 62,132
  • 37
  • 328
  • 418