Skip to content

v1.1.0

Latest

Choose a tag to compare

@kzemek kzemek released this 16 Nov 20:07
· 1 commit to main since this release

Highlights

Add rules option to Es6Maps.Formatter plugin.
It takes a list of {[glob], options} tuples, with file globs like in Path.wildcard/2.
Rules are evaluated top to bottom, and stop at first match; files that don't any rule are formatted with the default options.

# .formatter.exs
[
  plugins: [Es6Maps.Formatter],
  inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
  es6_maps: [
    rules: [
      {["config/runtime.exs", "lib/**/keep_vanilla.ex"], map_style: :vanilla},
    ]
  ]
]

The default rules are [{["config/runtime.exs"], map_style: :vanilla}],

By default, "config/runtime.exs" is formatted with map_style: :vanilla.
Full Changelog: v1.0.3...v1.1.0