Releases: adobe/elixir-styler
v0.11.6
v0.11.5
v0.11.4
Improvements
Shoutout @milmazz for all the deprecation work below =)
- Deprecations: Rewrite 1.16 Deprecations (h/t @milmazz for all the work here)
- add
//1
step toEnum.slice/2|String.slice/2
with decreasing ranges File.stream!(file, options, line_or_bytes)
=>File.stream!(file, line_or_bytes, options)
- add
- Deprecations:
Path.safe_relative_to/2
=>Path.safe_relative/2
v0.11.3
v0.11.2
v0.11.1
v0.11.0
Improvements
Comments
Styler will no longer make comments jump around in any situation, and will move comments with the appropriate node in all cases but module directive rearrangement (where they'll just be left behind - sorry! we're still working on it).
with
Statements
This release has a slew of improvements for with
statements. It's not surprising that there's lots of style rules for with
given that just about any case
, if
, or even cond do
could also be expressed as a with
. They're very powerful! And with great power...
- style trivial pattern matches ala
lhs <- rhs
tolhs = rhs
(#86) - style
_ <- rhs
torhs
- style keyword
, do:
todo end
rather than wrapping multiple statements in parens - rewrite as an
if
statement when appropriate (#100)
Other
- Rewrite
{Map|Keyword}.merge(single_key: value)
to useput/3
instead (#96)
Fixes
with
: various edge cases we can only hope no one's encountered and thus never reported
v0.10.5
v0.10.5
After being bitten by two of them in a row, Styler's test suite now makes sure that there are no idempotency bugs as part of its tests.
In short, we now have assert style(x) == style(style(x))
as part of every test. Sorry for not thinking to include this before :)
Fixes
- alias: fix single-module alias deletion newline bug
v0.10.4 -- The Frame.io Contributors Edition!
Improvements
Fixes
- pipes: unnest all pipe starts in one pass (
f(g(h(x))) |> j()
=>x |> h() |> g() |> f() |> j()
, #94, h/t @tomjschuster)
v0.10.3
Improvements
- charlists: leave charlist rewriting to elixir's formatter on elixir >= 1.15 (apparently we aren't the only people who thought that was a good idea!)
Fixes
- charlists: rewrite empty charlist to use sigil (
''
=>~c""
) - pipes: don't blow up extracting fully-qualified macros (
Foo.bar do end |> foo()
, #91, h/t @NikitaNaumenko)