Closed ghost closed 5 years ago
Yeah I am a bit confused, I'm learning Elm and https://github.com/evancz/elm-architecture-tutorial uses 2-space indentation and every time I save a file there, elm-format
reformats it, which means that the official tutorial doesn't use the right convention? Though, the official docs recommends using elm-format
.
Evan has been waiting until elm-format hits v1.0 before formatting all the code examples in the official docs. Sorry for the delay!
Also, the official style guide is here: http://elm-lang.org/docs/style-guide It's not very comprehensive, though, so a lot of edge cases have been defined during the development of elm-format (with input from the community on the mailing lists).
@avh4 cool, thanks for the update!
I would like to know where this standard is coming from, since there's no specification within elm-format and the style guide from elm-lang is rather liberal:
Namely, elm-lang's core libraries use 2 spaces as indentation, and though nothing is stated about this in the style guide, I take it 2 spaces is the way to go. elm-format decides to use 4 spaces (fair enough) but again there's no convention specs.
This obviously applies to a number of other cases.