Skip to content

Commit 719669e

Browse files
authored
fix: Formatter config depending in Mix breaks formatter (#181)
When using `error_tracker` in other projects and telling the formatter to import the config from `:error_tracker` dependency causes ExpertLS to break and not applying styles properly. Debugging locally I found that it is because of the Elixir version autodetect we use. This pull request is removing that, as we: - are not updating it regularly - if we import the config on projects using error_tracker we do not need to get the minimum elixir version on that project.
1 parent e0ae6f5 commit 719669e

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

.formatter.exs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
# Used by "mix format"
22
locals_without_parens = [error_tracker_dashboard: 1, error_tracker_dashboard: 2]
33

4-
# Parse SemVer minor elixir version from project configuration
5-
# eg `"~> 1.15"` version requirement will yield `"1.15"`
6-
[elixir_minor_version | _] = Regex.run(~r/([\d\.]+)/, Mix.Project.config()[:elixir])
7-
84
[
95
import_deps: [:ecto, :ecto_sql, :plug, :phoenix],
106
inputs: ["{mix,.formatter,dev,dev.*}.exs", "{config,lib,test}/**/*.{heex,ex,exs}"],
117
plugins: [Phoenix.LiveView.HTMLFormatter, Styler],
128
locals_without_parens: locals_without_parens,
139
export: [locals_without_parens: locals_without_parens],
1410
styler: [
15-
minimum_supported_elixir_version: "#{elixir_minor_version}.0"
11+
minimum_supported_elixir_version: "1.15.0"
1612
]
1713
]

0 commit comments

Comments
 (0)