Elm-format 0.8.2

elm-format formats Elm source code according to a standard set of rules based on the official Elm Style Guide.

Here are details about the latest release:

Simpler editor integration

Two small improvements should make integration with code editors smoother with elm-format 0.8.2. When installed with npm, elm-format startup time has been reduced by 70% (roughly 150ms). And elm-format will now assume it should work in Elm 0.19 mode if autodetection of your Elm version fails.

If you still need to work with Elm 0.18 code, you must make sure that either elm-format is run from the directory containing your elm-package.json file (and there must not be a elm.json file in that directory), or elm-format must be invoked with the --elm-version=0.18 option.

exposing (..)

The feature of automatically expanding exposing (..) in module lines has been removed. While exposing everything in a module is an anti-pattern for production code, it can be useful for rapid development sketches when the interfaces of your modules are not important.

To replace the old expansion behavior, elm-format now allows module lines without an exposing clause. Such lines will have the exposing automatically generated using the same logic that was previously used to expand exposing (..).

Other changes

elm-format 0.8.2 also contains several bug fixes and other small changes. See the CHANGELOG for details.


npm install -g elm-format

or download from the release page.

Thanks to ā€¦

  • mdevlamynck for implementing the fix for removing invalid (..) in @docs lines
  • andys8 and BendingBender for debugging slow startup times when installed via npm
  • omnibs for help updating the parser

Iā€™m really happy about the exposing (..) change, thank you! I normally expose everything while developing a module, and then constrain exports at the end, so this will save me quite a bit of time.


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