This simplification is pretty nice, but has a few problems:
It stands out as a simplification because it does not have an autofix (because there are multiple solutions for it, relating to code style)
There are some edge cases where this simplification is not necessarily appropriate
Record updates f a |> (\v -> { v | a = 1 })
Extracting through destructuring f a |> (\(Thing thing) -> thing)
From feedback, people seem to think the idea is good and that it improves the readability of the code (with the exceptions that probably need some refinement), but I think it stands out too much (especially the non-fixing part) and should therefore be moved to a separate rule, probably in jfmengels/elm-review-code-style, where autofix could be supported by configuring the rule (PRs welcome :smile: )
Removed the check introduced in https://github.com/jfmengels/elm-review-simplify/pull/124
This simplification is pretty nice, but has a few problems:
f a |> (\v -> { v | a = 1 })
f a |> (\(Thing thing) -> thing)
From feedback, people seem to think the idea is good and that it improves the readability of the code (with the exceptions that probably need some refinement), but I think it stands out too much (especially the non-fixing part) and should therefore be moved to a separate rule, probably in
jfmengels/elm-review-code-style
, where autofix could be supported by configuring the rule (PRs welcome :smile: )