jfmengels / elm-review-simplify

Provides elm-review rules to simplify your Elm code
https://package.elm-lang.org/packages/jfmengels/elm-review-simplify/latest/
BSD 3-Clause "New" or "Revised" License
20 stars 9 forks source link

WIP: Cleanup #130

Closed lue-bird closed 1 year ago

lue-bird commented 1 year ago

I will add elm/random simplifications next, but first a bit of cleanup. If you don't like certain changes, let's discuss and use one style consistently.

lue-bird commented 1 year ago

For patterns like

case ModuleNameLookupTable.moduleNameAt lookupTable range of
    Just [ "Basics" ] ->

Do you prefer leaving them as is or changing them to an uncons pattern

case ModuleNameLookupTable.moduleNameAt lookupTable range of
    Just ("Basics" :: []) ->
jfmengels commented 1 year ago

I tend to prefer [ "Basics" ] -> (even with multiple elements [ "A", "B", "C" ] ->) when I know the exact number. So yes, leave them as is