NOTE: the latest version is 1.1.3
🔧NoRecordAliasConstructor forbids using the automatically generated record type alias constructor.
NoRecordAliasConstructor
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.
config : List Rule config = [ NoRecordAliasConstructor.rule ]
🔧
NoRecordAliasConstructorforbids using the automatically generated record type alias constructor.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