Skip to content

v0.11.0

Compare
Choose a tag to compare
@novaugust novaugust released this 12 Dec 01:44
· 162 commits to main since this release

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).

  • Keep comments in logical places when rewriting if/unless/cond/with (#79, #97, #101, #103)

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 to lhs = rhs (#86)
  • style _ <- rhs to rhs
  • style keyword , do: to do 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 use put/3 instead (#96)

Fixes

  • with: various edge cases we can only hope no one's encountered and thus never reported