Renamed to xie-lang/no-typealias-constructor-call. That is where the repository lives now. It has not been published as a package under the new name.
Versions published as lxierita/no-typealias-constructor-call still install under that name. 2 versions of 2 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/xie-lang/no-typealias-constructor-call.
What we checked: The repo moved to github.com/xie-lang/no-typealias-constructor-call. Rebuilt with git archive from commit 12194ca90255 of https://github.com/xie-lang/no-typealias-constructor-call (zip prefix lxierita-no-typealias-constructor-call-12194ca/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 c908f53096ceb442be9e3875b81d182031f170d7.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/lxierita/no-typealias-constructor-call/zipball/1.0.1/
A elm-review rule that forbids using type alias record constructors to create a record.
This rule does not apply to the map functions in Json.Decode.
For example, in the following code
type alias Foo =
{ foo : String
, bar : Bool
, baz : Float
}
init : Foo
init =
Foo "hello" True 0.2Foo "hello" True 0.2 will be marked as error.
To be rid of the error, simply do:
type alias Foo =
{ foo : String
, bar : Bool
, baz : Float
}
init : Foo
init =
{ foo = "hello"
, bar = True
, baz = 0.2
}After adding elm-review to your project, import this rule from
your ReviewConfig.elm file and add it to the config. E.g.:
import NoTypeAliasConstructorCall
import Review.Rule exposing (Rule)
config : List Rule
config =
[ NoTypeAliasConstructorCall.rule ]The following code will not report an error
type alias Point =
{ x : Float, y : Float }
point : Decoder Point
point =
map2 Point
(field "x" float)
(field "y" float)