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

后端 未结 7 650
长发绾君心
长发绾君心 2020-12-07 08:30

I\'m assigned to take some messed code from other developers who have already left the company recently.

I am curiously asking is there some plug-in of Visual Studio

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 09:12

    If you're a heavy visual studio user, you can simply open your preference settings and add the following to your settings.json:

    ...
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.organizeImports": true
    }
    ....
    

    Hopefully this can be helpful!

提交回复
热议问题