sparksp / elm-review-imports

elm-review rule to enforce consistent import aliases
https://package.elm-lang.org/packages/sparksp/elm-review-imports/latest/
MIT License
14 stars 4 forks source link

Bump jfmengels/elm-review-simplify from 2.1.0 to 2.1.3 in /review #192

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps jfmengels/elm-review-simplify from 2.1.0 to 2.1.3.

Changelog

Sourced from jfmengels/elm-review-simplify's changelog.

[2.1.3] - 2023-10-23

The rule now simplifies:

  • composition checks now also detect function pairs across nested compositions like (here << ...) >> (... << there)
  • List.sort (List.sort list) to List.sort list
  • List.sortBy f (List.sortBy f list) to List.sortBy f list
  • String.concat (List.repeat n str) to String.repeat n str
  • String.concat (List.intersperse str strings) to String.join str strings
  • Set.foldl/r f initial Set.empty to initial
  • Set.foldl/r (\_ soFar -> soFar) initial set to initial
  • Set.union set set to set
  • Set.intersect set set to set
  • String.foldl/r f initial "" to initial
  • String.foldl/r (\_ soFar -> soFar) initial string to initial
  • Result.fromMaybe x (Just a) to Ok a
  • Result.fromMaybe x Nothing to Err x
  • the same operations for Json.Decode.map as for e.g. Task.map and Result.map
  • the same operations for Json.Decode.map2-8 as for e.g. Task.mapN and Result.mapN
  • the same operations for Json.Decode.andThen as for e.g. Task.andThen and Result.andThen
  • Tuple.first (Tuple.mapSecond changeFirst tuple) to Tuple.first tuple
  • Tuple.first (Tuple.mapBoth changeFirst changeSecond tuple) to Tuple.first (Tuple.mapFirst changeFirst tuple)
  • Tuple.second (Tuple.mapFirst changeSecond tuple) to Tuple.second tuple
  • Tuple.second (Tuple.mapBoth changeFirst changeSecond tuple) to Tuple.second (Tuple.mapSecond changeSecond tuple)
  • Maybe.withDefault a << Just to identity
  • Result.withDefault a << Ok to identity
  • List.sum << List.singleton to identity
  • List.product << List.singleton to identity
  • List.concat << List.singleton to identity
  • Platform.Cmd.batch << List.singleton to identity
  • Platform.Sub.batch << List.singleton to identity
  • List.minimum << List.singleton to Just
  • List.maximum << List.singleton to Just
  • Maybe.map2 f firstMaybe Nothing to Nothing (same for all Maybe.mapN)
  • Maybe.map2 f (Just a) (Just b) to Just (f a b) (same for all Maybe.mapN)
  • Array.get 2 (Array.repeat 10 x) -> Just x
  • Array.get 100 (Array.repeat 10 x) -> Nothing
  • Array.get 2 (Array.initialize 10 f) -> Just (f 2)
  • Array.get 100 (Array.initialize 10 f) -> Nothing
  • Array.foldl f initial Array.empty to initial (same for Array.foldr)
  • Array.foldl (\_ soFar -> soFar) initial array to initial (same for Array.foldr)
  • Array.toList Array.empty to []
  • Array.toList (Array.repeat n a) to List.repeat n a
  • Array.toIndexedList Array.empty to []
  • Array.slice n n array to Array.empty
  • Array.slice n 0 array to Array.empty
  • Array.slice a z Array.empty to Array.empty
  • Array.slice 2 1 array to Array.empty
  • Array.slice -1 -2 array to Array.empty
  • List.map Tuple.second (Array.toIndexedList array) to Array.toList array
  • Result.map f << Err to Err

... (truncated)

Commits
  • 5e9924e 2.1.3
  • dc131ea Fix review/elm.json
  • 47096a7 Add ++ case for listGetElements (#283)
  • 3d32eb3 Move Dict.union tests into dictUnionTests
  • 8b14a9b Rename usingListConcatTests to listConcatTests
  • 75a35ba Move List.concat test into usingListConcatTests
  • 787d9ed Improve names of fromListGetLiteral
  • 640df07 Add new flatFromList simplifications to summary
  • 985b7a3 stringConcatChecks use emptiableFlatFromListChecks
  • e86187f Remove unused import
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)