Search code examples
typescriptwebstormunused-variables

WebStorm TS: Show all unused functions / variables/ modules etc


WebStorm can detect unused "items" like functions, variables or modules and gives you a fix advice (mostly to remove it). Now this feature is really nice but you have to be inside the file to get the hint. Obviously if you have a large code base with lots of refactoring, you'd like to get a list of all this unused "items".

Is there a way to display a full list of all unused "items" or fixing advises?

enter image description here

enter image description here


Solution

  • You can get the list of unused items by:

    Code > Run Inspection by Name ... >

    Here you can choose Unused global symbol, Unused local symbol, Unused imports ...

    If you want to get the list of all fixing advises you can run:

    Code > Inspect Code...