SiriusStarr/elm-review-no-single-pattern-case/2.0.0

NOTE: the latest version is 2.1.2

elm-review-no-single-pattern-case

Provides elm-review rules to disallow single-pattern case expressions.

Provided rules

  • 🔧 NoSinglePatternCase - Reports case...of expressions that match only a single pattern. Such case expressions typically are either unnecessary or may be written more concisely.

Configuration

module ReviewConfig exposing (config)

import NoSinglePatternCase
import Review.Rule exposing (Rule)

config : List Rule
config =
    [ NoSinglePatternCase.rule
        NoSinglePatternCase.fixInArgument
    ]

Try it out

You can try the example configuration above out by running the following command:

elm-review --template SiriusStarr/elm-review-no-single-pattern-case/example

Changelog

  • 2.0.0 -- Add fixes, with option to destructure in the argument or in a let
  • 1.0.1 -- Fix minor documentation issue
  • 1.0.0 -- Initial release