lue-bird/elm-review-mini-common/1.0.0

LetValueOrFunctionIsTypeAnnotated

review : Review

Enforces that let in value/function declarations have a type annotation.

Type annotations help to quickly understand what's expected in the code, and it will help the compiler give better error messages.

This rule does not report top-level declarations without a type annotation. For that, enable ModuleValueOrFunctionIsTypeAnnotated.

reported

a : number
a =
    let
        b =
            2
    in
    b

not reported

a =
    let
        b : number
        b =
            2
    in
    b