Skip to content

Commit 428012a

Browse files
committed
add FreedomFormatter and trailing commas
1 parent 43b0d7c commit 428012a

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

.formatter.exs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Used by "mix format"
22
[
3-
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
3+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
4+
plugins: [
5+
FreedomFormatter,
6+
],
7+
line_length: 92,
8+
trailing_comma: true,
49
]

mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule Exit.MixProject do
2020
# Run "mix help compile.app" to learn about applications.
2121
def application do
2222
[
23-
extra_applications: [:logger]
23+
extra_applications: [:logger],
2424
]
2525
end
2626

@@ -29,6 +29,7 @@ defmodule Exit.MixProject do
2929
[
3030
{:dialyxir, "~> 1.4", only: :dev, runtime: false},
3131
{:ex_doc, "~> 0.32", only: :dev, runtime: false},
32+
{:freedom_formatter, "~> 2.1", only: [:dev, :test], runtime: false},
3233
]
3334
end
3435
end

mix.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"},
44
"erlex": {:hex, :erlex, "0.2.8", "cd8116f20f3c0afe376d1e8d1f0ae2452337729f68be016ea544a72f767d9c12", [:mix], [], "hexpm", "9d66ff9fedf69e49dc3fd12831e12a8a37b76f8651dd21cd45fcf5561a8a7590"},
55
"ex_doc": {:hex, :ex_doc, "0.39.3", "519c6bc7e84a2918b737aec7ef48b96aa4698342927d080437f61395d361dcee", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "0590955cf7ad3b625780ee1c1ea627c28a78948c6c0a9b0322bd976a079996e1"},
6+
"freedom_formatter": {:hex, :freedom_formatter, "2.1.3", "2be47e85e4aaf4bd5b5a918af872a1e2067483f65dc2c0179c0d3f6662bceab6", [:mix], [], "hexpm", "ec0037991494514a8ec8a78450d980f5ec39ae3620fbb6a17b0a7edf538cbaa0"},
67
"makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},
78
"makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"},
89
"makeup_erlang": {:hex, :makeup_erlang, "1.0.2", "03e1804074b3aa64d5fad7aa64601ed0fb395337b982d9bcf04029d68d51b6a7", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "af33ff7ef368d5893e4a267933e7744e46ce3cf1f61e2dccf53a111ed3aa3727"},

test/exit_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ defmodule ExitTest do
6969
%{user_id: 2, status: :away},
7070
# first non-away user
7171
%{user_id: 3, status: :active},
72-
%{user_id: 4, status: :active}
72+
%{user_id: 4, status: :active},
7373
]
7474

7575
# Rotate while users are away (inactive)
@@ -79,7 +79,7 @@ defmodule ExitTest do
7979
%{user_id: 3, status: :active},
8080
%{user_id: 4, status: :active},
8181
%{user_id: 1, status: :away},
82-
%{user_id: 2, status: :away}
82+
%{user_id: 2, status: :away},
8383
]
8484

8585
assert actual == expected

0 commit comments

Comments
 (0)