NOTE: the latest version is 1.1.3
🔧NoRecordAliasConstructor forbids using a record type alias constructor function.
NoRecordAliasConstructor
Read more about the why in no-record-type-alias-constructor-function.
no-record-type-alias-constructor-function
type alias User = { name : String, age : Int } User "Balsa" 42
will be marked as error and automatically fixed:
{ name = "Balsa", age = 42 }
The same goes for cases where no arguments are applied:
map2 User (field "name" string) (field "age" int)
fixed
map2 (\name age -> { name = name, age = age }) (field "name" string) (field "age" int)
See the readme for why this is useful.
import NoRecordAliasConstructor config : List Rule config = [ NoRecordAliasConstructor.rule ]
🔧
NoRecordAliasConstructorforbids using a record type alias constructor function.Read more about the why in
no-record-type-alias-constructor-function.examples
will be marked as error and automatically fixed:
The same goes for cases where no arguments are applied:
fixed
See the readme for why this is useful.
configuration