jfmengels/elm-lint/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Lint.Rules.NoConstantCondition

rule : String -> List Error

Forbid the use of expressions in an If condition whose value are always the same.

rules =
    [ NoConstantCondition.rule
    ]

Fail

if True then a else b
if False then a else b
if foo == foo then a else b

Success

if foo == bar then a else b