Intellij-elm now finds unused imports and dead code


#1

Version 2.2.0 of the Elm plugin for IntelliJ adds several big new features:

  1. Find (and remove) unused imports
  2. Find dead code and unused parameters
  3. Easily add/remove things from a module’s exposing list without losing your place

I made a video demonstrating the new features:

It’s not shown in the video, but you can run the “unused import” inspection over your entire project and click a single button to cleanup the imports across all of your Elm files. So even if you don’t normally use IntelliJ, you may want to give it a try just to do a one-off cleanup of your unused imports & dead code.

Here’s what it looks like when optimizing imports across the entire project:

Questions? Feature Requests? Please create an issue on klazuka/intellij-elm.


#2

Very great work, thanks a lot!


#3

A huge thank you for the work you put into this! I used the new functionality and removed a bunch of dead code/imports the other day. It worked perfectly! And since elm-analyze is still missing for 0.19 there were an non-insignificant amount to get rid of. :wink: I may be partial since I cannot use anything but webstorm as a code editor but I believe you have created the best Elm dev experience!


#4

@mika elm-analyze is out with support for 0.19. But it doesn’t warn about unused exposed functions like this does (from what I’ve understood).


#5

Actually, elm-analyze does support finding exposed functions that do not need to be exposed.