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
.
a =
1
a : number
a =
1
b : number
b =
let
c =
2
in
c
You can try this rule out by running the following command:
elm-review --template jfmengels/elm-review-common/example --rules NoMissingTypeAnnotation