lue-bird / elm-review-pattern / Review.Pattern.Record

Forbid { field, ... } record patterns.

forbid : Review.Rule.Rule

Forbid { field, ... } record patterns.

config =
    [ Review.Pattern.Record.forbid
    ]

For example

a ({ field } as record) =
    f field record

will be fixed to

a record =
    f record.field record

Patterns without as will not get an auto-fix, so either manually apply this change or add a temporary as.

why