Elm-review is pretty amazing

Ran it on the SIOT frontend:

A lot of lines changed – most changes were done automatically with the --fix-all option.

It’s now part of the CI pipeline.

nice. Seems to have removed a lot of redundant code.

Yeah: two big things I noticed:

  • its very aggressive in unused code removal. At first I kind of questioned this as I tend to define everything I might ever need. But, it is nice to know what is actually being used.
  • It also moves the declaration of variables as close to their use as possible.

Second point is well taken and good, first point is a balance, since being verbose could be
good for readability but then less lines also means less bugs.

I was initially distressed a bit when it removed stuff like:

But, then I thought – having only the styles I am currently using helps with consistency in the app – you won’t have someone picking h2 in one component, and h3 in the next, when we should be using the same one. We can always add more when needed, rather than put them all in up front just in case.