Skip to content

sparksp/elm-review-imports

Repository files navigation

elm-review-imports

elm package elm-review 2.10 elm 0.19 Tests

Provides elm-review rules to enforce consistent import aliases.

Provided rules

Configuration

import NoInconsistentAliases
import NoModuleOnExposedNames
import Review.Rule exposing (Rule)

config : List Rule
config =
    [ NoInconsistentAliases.config
        [ ( "Html.Attributes", "Attr" )
        , ( "Json.Decode", "Decode" )
        , ( "Json.Encode", "Encode" )
        ]
        |> NoInconsistentAliases.noMissingAliases
        |> NoInconsistentAliases.rule
    , NoModuleOnExposedNames.rule
    ]

Try it out

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

elm-review --template sparksp/elm-review-imports/example