for more information visit the package's GitHub page
Package contains the following modules:
Helps with preventing redundant usage of concatenation. Expressions like [ a ]
++ b
can be rewritten as a :: b
, and expressions like [ a ] ++ [ b ]
could
be simply [ a, b ]
.
module ReviewConfig exposing (config)
import NoRedundantConcat
import Review.Rule exposing (Rule)
config : List Rule
config =
[ NoRedundantConcat.rule
]
++
([ foo ] ++ [ bar ] -> [ foo, bar ]
)[ foo ] ++ bar -> foo :: bar
)List.concat
with list literals (List.concat [ [ foo ], [ bar ] ] -> [ foo, bar ]
)++
with String
literals ("foo" ++ "bar" -> "foobar"
)List.append
with list literalsString.append
with string literalsString.concat
with string literalsString.join ""
over String.concat
These all follow a common pattern of making the concatenation of literals more complex than it has to be.