mthadley / elm-review-unit / NoUnmatchedUnit

rule : Review.Rule.Rule

Reports when a Unit (()) is not matched in a pattern.

🔧 Running with --fix will automatically remove all the reported errors.

config =
    [ NoUnmatchedUnit.rule
    ]

Fail

foo : () -> Int
foo _ =
    3

Success

foo : () -> Int
foo () =
    3

When (not) to enable this rule

Try it out

You can try this rule out by running the following command:

elm-review --template mthadley/elm-review-unit/example --rules NoUnmatchedUnit