DEV Community

Ilias Van Peer
Ilias Van Peer

Posted on

Elm tools

Elm, besides being an awesome language with a nice ecosystem of packages, also has an incredible ecosystem of tools. In this post, I list a few of my favourite ones and quite shamelessly plug a few of my own.

elm-format

npm i elm-format

One of the best known tools in the Elm ecosystem, this one needs no introduction.

A quick overview:

  • zero-config formatting of all your Elm code
  • integrations with popular editors
  • can be used in CI using the --validate flag

elm-test

npm i elm-test

elm-test is your one-stop shop for testing Elm code. Useful for plain old unit tests, property-based tests using fuzz tests, as well as inspecting generated HTML using Test.Html.Query in combination with some selectors, it enables some really powerful testing scenario's.

The de-facto way of using elm-test is through the node-based test-runner.

Noteworthy: it's supported on travis, too!

elm-verify-examples

npm i elm-verify-examples

Incredibly useful when writing documentation for your packages, elm-verify-examples allows running your examples and verifying their correctness.

If you're publishing packages, this should be part of your CI setup!

elm-doc-preview

npm i elm-doc-preview

Writing documentation for a package is so much easier when there is a nice way to preview what it will actually look like. And that's where elm-doc-preview comes in!

elm-doc-preview can be used locally, but also exists as a hosted version that can preview docs for GitHub repositories, as long as a README.md and docs.json are committed.

elm-doc

npm i elm-doc

Along the same lines, but geared towards writing applications, elm-doc allows viewing the docs of all of your dependencies in one single location, fully offline.

Disclaimer: I made this

elm-analyse

npm i elm-analyse

elm-analyse analyses your Elm code and can help identify a bunch of (potential) issues, while also allowing quick-fixes for a bunch of best practices. Very cool tool!

elm-xref

npm i elm-xref

Inspired by Erlang/OTP's http://erlang.org/doc/apps/tools/xref_chapter.html, elm-xref is a cross-referencing tool.

This essentially means that it can do static analysis of your codebase and identify unused functions (both private and exposed), or look for all the places a given function is used.

Disclaimer: I also made this

elm-dependencies-analyzer

An online tool that analyses your elm.json, and can tell you which of your dependencies have updates available, shows your potential incompatibilities between the available versions of your dependencies, and so on.

If you've ever wondered why you can't update elm/http, this tool can tell you why!

@dillonkearns/elm-graphql

If you're using GraphQL with Elm (or want to use GraphQL with Elm), this package/tool combination allows generating a type-safe interface to your GraphQL backend based on the schema.

Great docs, very well thought-out API, and overall an absolute joy to work with!


Did I miss any of the tools you love to use? Feel free to point out in comments!

Top comments (3)

Collapse
 
leojpod profile image
leojpod

Thanks for the list!

One of the first elm package I install in any project I start is remote-data. Having this NotAsked, Loading, Success & Failure state is just a blast to work with.

Collapse
 
kornicameister profile image
Tomasz Trębski

right now dependabot (dependabot.com/) has a support for elm.json as well ;-)

Collapse
 
leojpod profile image
leojpod

Also, damn I need to run and check for a vim plugin for elm-xref !