fysiweb/elm-review-sorted/1.0.1

NOTE: the latest version is 1.0.3

NoUnsortedRecordFields

rule : Rule

Reports...

config =
    [ NoUnsortedRecordFields.rule
    ]

Fail

type alias Foo =
    { b : Int, a : Int }


foo : Foo
foo =
    { b = 1, a = 2 }

Success

type alias Foo =
    { a : Int, b : Int }


foo : Foo
foo =
    { a = 2, b = 1 }

When (not) to enable this rule

This rule is useful when you want to enforce sorting in record fields. THis rule is not useful when you don't.