Releases: adobe/elixir-styler
Releases · adobe/elixir-styler
v0.6.1
Improvements
- Better error handling:
mix format
will still format files if a style fails
Fixes
mix style
: only run on .ex
and .exs
files
ModuleDirectives
: now expands alias __MODULE__.{A, B}
(h/t @adriankumpf)
v0.6.0
Features
mix style
: brought back to life for folks who want to incrementally introduce Styler
Fixes
Styler.Style.Pipes
:
- include
x in y
and ^foo
(for ecto) as a valid pipe starts
- work even harder to keep rewrites on one line
v0.5.2
Fixes
ModuleDirectives
: hande dynamic module names, like var = Foo; defmodule var, do: ...
Pipes
: include Ecto.Query.from
and Query.from
as valid pipe starts (h/t @Nezteb)
v0.5.1
Improvements
Optimized styling just the littlest bit
v0.5.0
Improvements
Styler
now implements Mix.Task.Format
, meaning it is now an Elixir formatter plugin.
See the README for new installation & usage instructions
Breaking Change! Wooo!
- the
mix style
task has been removed
v0.4.1
Improvements
Pipes
rewrites |> Enum.into(%{}[, mapper])
and Enum.into(Map.new()[, mapper])
to Map.new/1,2
calls
v0.4.0
Improvements
Pipes
rewrites some two-step processes into one, fixing these credo issues in pipe chains:
Credo.Check.Refactor.FilterCount
Credo.Check.Refactor.MapJoin
Credo.Check.Refactor.MapInto
Fixes
ModuleDirectives
handles even weirder places to hide your aliases (anonymous functions, in this case)
Pipes
tries even harder to keep single-pipe rewrites of invocations on one line
v0.3.1
Fixes
Pipes
- fixed omission of
==
as a valid pipe start operator (h/t @peake100 for the issue)
- fixed rewrite of
a |> b
, where b
was invoked without parenthesis
v0.3.0
Improvements
- Enabled
Defs
style and overhauled it to properly handles comments
- Optimized and tweaked
ModuleDirectives
style
- Now culls newlines between "groups" of the same directive
- sorts
@behaviour
directives
- orders directives within non defmodule contexts (eg, a
def do
) if there's at least one alias|require|use|import
Fixes
Pipes
will try to keep single-pipe rewrites on one line
v0.2.0
Improvements
- Added
Styler.Style.ModuleDirectives
#6
- Note that this is potentially destructive in some rare cases. See moduledoc for more.
mix style -
reads and writes to stdin/stdout #4
Fixes
Styler.Style.Pipes
is now aware of unless
blocks