avh4 / elm-format

elm-format formats Elm source code according to a standard set of rules based on the official Elm Style Guide
BSD 3-Clause "New" or "Revised" License
1.31k stars 148 forks source link

Coding style for elm-format contributors #737

Open avh4 opened 3 years ago

avh4 commented 3 years ago

for coding style, it’s currently a bit of a mess, and is just best judgement based on nearby code.

I try to use these rules myself:

and I guess the style I’ve been sort of using for new code is: 4-space indents, using LambdaCase when possible, and:

if p
    then x
    else y

let
    f = x
in
body

f x y =
    do
        ...