elm-review-rules-to-avoid
Provides some elm-analyse rules for elm-review
that we don't want to publish. These are written to demonstrate that just because you can write a rule doesn't mean you should!
Provided rules
NoFunctionInLet
- Reports functions declared inlet
expressions.NoNothingToNothing
- Reports case expressions matching and returningNothing
.NoSingleFieldRecord
- Reports records containing a single field.NoSingleLineRecords
- Reports record type aliases declared on a single line.
Configuration
module ReviewConfig exposing (config)
import NoFunctionInLet
import NoNothingToNothing
import NoSingleFieldRecord
import NoSingleLineRecords
import Review.Rule exposing (Rule)
config : List Rule
config =
[ NoFunctionInLet.rule
, NoNothingToNothing.rule
, NoSingleFieldRecord.rule
, NoSingleLineRecords.rule
]
Try it out
You can try the example configuration above out by running the following command:
elm-review --template sparksp/elm-review-rules-to-avoid/preview