Intellij-elm now finds unused imports and dead code

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:

https://youtu.be/FsoaYe-en7s

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:
19%20PM

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

38 Likes

Very great work, thanks a lot!

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!

1 Like

@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).

1 Like

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

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.