jfmengels/elm-review-common/1.2.2

NOTE: the latest version is 1.3.5

elm-review-common

Provides common linting rules for elm-review.

Provided rules

  • NoDeprecated - Reports usages of deprecated functions and types.
  • [🔧 NoExposingEverything](hhttps://package.elm-lang.org/packages/jfmengels/elm-review-common/1.2.2/NoExposingEverything "Provides automatic fixes" - Forbids exporting everything from a module.
  • NoImportingEverything - Forbids importing everything from a module.
  • NoMissingTypeAnnotation - Reports top-level declarations that do not have a type annotation.
  • NoMissingTypeAnnotationInLetIn - Reports let in declarations that do not have a type annotation.
  • [🔧 NoMissingTypeExpose](hhttps://package.elm-lang.org/packages/jfmengels/elm-review-common/1.2.2/NoMissingTypeExpose "Provides automatic fixes" - Reports types that should be exposed but are not.
  • [🔧 NoPrematureLetComputation](hhttps://package.elm-lang.org/packages/jfmengels/elm-review-common/1.2.2/NoPrematureLetComputation - Reports let declarations that are computed earlier than needed.

Configuration

import NoDeprecated
import NoExposingEverything
import NoImportingEverything
import NoMissingTypeAnnotation
import NoMissingTypeAnnotationInLetIn
import NoMissingTypeExpose
import NoPrematureLetComputation
import Review.Rule exposing (Rule)

config : List Rule
config =
    [ NoExposingEverything.rule
    , NoDeprecated.rule NoDeprecated.defaults
    , NoImportingEverything.rule []
    , NoMissingTypeAnnotation.rule
    , NoMissingTypeAnnotationInLetIn.rule
    , NoMissingTypeExpose.rule
    , NoPrematureLetComputation.rule
    ]

Try it out

You can try the example configuration above out by running the following command:

elm-review --template jfmengels/elm-review-common/example

Thanks

Thanks to @sparksp for writing NoMissingTypeExpose.