【问题标题】:Sort and remove unused imports in tsx and ts files in Visual Studio在 Visual Studio 中对 tsx 和 ts 文件中未使用的导入进行排序和删除
【发布时间】:2020-09-23 10:08:56
【问题描述】:

我更喜欢使用 Visual Studio 作为我的单一 IDE,而不是像我的许多同事那样切换到 Visual Studio Code 进行前端开发。我真正想念的一件事是Visual Studio Code Organize imports

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

我可以在 C# 文件中使用 default code cleanup 为未使用的 using 命名空间实现此目的,但我还没有找到对 .ts.tsx 文件执行此操作的任何东西。

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

有什么好的方法可以实现吗?

【问题讨论】:

    标签: c# reactjs typescript visual-studio visual-studio-2019


    【解决方案1】:

    有时你需要看两次,你可以简单地右键单击并按Organize Imports

    原来的快捷键是Ctrl+RCtrl+G

    来源:

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

    【讨论】:

      猜你喜欢
      • 2017-10-28
      • 1970-01-01
      • 2010-10-17
      • 1970-01-01
      • 2011-08-05
      • 2019-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多