jfmengels / review-common / NoMissingTypeAnnotation

rule : Review.Rule.Rule

Reports top-level declarations that do not have a type annotation.

Type annotations help you understand what happens in the code, and it will help the compiler give better error messages.

config =
    [ NoMissingTypeAnnotation.rule
    ]

This rule does not report declarations without a type annotation inside a let in. For that, enable NoMissingTypeAnnotationInLetIn.

Fail

a =
    1

Success

a : number
a =
    1

b : number
b =
    let
        c =
            2
    in
    c