jxxcarlson/elm-review-codeinstaller/13.0.0

Install.Type

Install.Type provides a rule that checks if a type is present in the given module and if not, it adds it right after the imports.

For example, the rule

Install.Type.config "Frontend" "Magic" [ "Inactive", "Wizard String", "Spell String Int" ]
    |> Install.customType

results in insertion the text below in the module "Frontend":

type Magic
    = Inactive
    | Wizard String
    | Spell String Int
config : String -> String -> List String -> Config

Rule to add a type to a module if it is not present

type alias Config =
Config

Configuration for rule.