Skip to content

Commit 0017a55

Browse files
committed
Formatting
1 parent b8b50ca commit 0017a55

9 files changed

Lines changed: 21 additions & 36 deletions

File tree

.credo.exs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@
117117
{Credo.Check.Refactor.NegatedConditionsInUnless},
118118
{Credo.Check.Refactor.NegatedConditionsWithElse},
119119
{Credo.Check.Refactor.Nesting, max_nesting: 3},
120-
{Credo.Check.Refactor.PipeChainStart,
121-
excluded_argument_types: [:atom, :binary, :fn, :keyword], excluded_functions: []},
120+
{Credo.Check.Refactor.PipeChainStart, excluded_argument_types: [:atom, :binary, :fn, :keyword], excluded_functions: []},
122121
{Credo.Check.Refactor.UnlessWithElse},
123122

124123
#

.formatter.exs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[
2-
import_deps: [:joken, :tesla],
3-
inputs: ["*.{ex,exs}", "{config,lib,test}/**/*.{ex,exs}"]
2+
import_deps: [:phoenix],
3+
plugins: [Phoenix.LiveView.HTMLFormatter],
4+
line_length: 140,
5+
inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"]
46
]

config/config.exs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ import Config
1111
config :esbuild,
1212
version: "0.17.11",
1313
odyssey_hooks: [
14-
args:
15-
~w(js/odyssey.js --bundle --target=es2022 --format=cjs --minify --outfile=../priv/static/odyssey_hooks.min.js),
14+
args: ~w(js/odyssey.js --bundle --target=es2022 --format=cjs --minify --outfile=../priv/static/odyssey_hooks.min.js),
1615
cd: Path.expand("../assets", __DIR__),
1716
env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
1817
],
1918
odyssey_web_components: [
20-
args:
21-
~w(odyssey/odyssey_web_components.js --bundle --target=es2022 --minify --outfile=../priv/static/odyssey_web_components.min.js),
19+
args: ~w(odyssey/odyssey_web_components.js --bundle --target=es2022 --minify --outfile=../priv/static/odyssey_web_components.min.js),
2220
cd: Path.expand("../assets", __DIR__),
2321
env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
2422
]

lib/peek_app_sdk/client.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@ defmodule PeekAppSDK.Client do
106106
end
107107

108108
defp x_peek_auth_header(install_id, config_id),
109-
do:
110-
{"X-Peek-Auth",
111-
"Bearer #{PeekAppSDK.Token.new_for_app_installation!(install_id, nil, config_id)}"}
109+
do: {"X-Peek-Auth", "Bearer #{PeekAppSDK.Token.new_for_app_installation!(install_id, nil, config_id)}"}
112110

113111
# Migration helper for building backoffice URLs
114112
defp build_backoffice_url(config, peek_app_id, operation_name) do

lib/peek_app_sdk/config.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ defmodule PeekAppSDK.Config do
7272
%{
7373
peek_app_secret: Application.get_env(:peek_app_sdk, :peek_app_secret),
7474
peek_app_id: Application.get_env(:peek_app_sdk, :peek_app_id),
75-
peek_api_base_url:
76-
Application.get_env(:peek_app_sdk, :peek_api_base_url, @default_peek_api_base_url),
75+
peek_api_base_url: Application.get_env(:peek_app_sdk, :peek_api_base_url, @default_peek_api_base_url),
7776
peek_api_key: Application.get_env(:peek_app_sdk, :peek_api_key),
7877
client_secret_token: Application.get_env(:peek_app_sdk, :client_secret_token)
7978
}
@@ -89,8 +88,7 @@ defmodule PeekAppSDK.Config do
8988
%{
9089
peek_app_secret: Keyword.get(app_config, :peek_app_secret),
9190
peek_app_id: Keyword.get(app_config, :peek_app_id),
92-
peek_api_base_url:
93-
Application.get_env(:peek_app_sdk, :peek_api_base_url, @default_peek_api_base_url),
91+
peek_api_base_url: Application.get_env(:peek_app_sdk, :peek_api_base_url, @default_peek_api_base_url),
9492
peek_api_key: Keyword.get(app_config, :peek_api_key),
9593
client_secret_token: Keyword.get(app_config, :client_secret_token)
9694
}

lib/peek_app_sdk/metrics/client.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,5 @@ defmodule PeekAppSDK.Metrics.Client do
177177
end
178178

179179
defp x_peek_auth_header(install_id, config_id),
180-
do:
181-
{"X-Peek-Auth",
182-
"Bearer #{PeekAppSDK.Token.new_for_app_installation!(install_id, nil, config_id)}"}
180+
do: {"X-Peek-Auth", "Bearer #{PeekAppSDK.Token.new_for_app_installation!(install_id, nil, config_id)}"}
183181
end

lib/peek_app_sdk/ui/core_components.ex

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -319,20 +319,16 @@ defmodule PeekAppSDK.UI.CoreComponents do
319319
range search select tel text textarea time url week hidden radio)
320320
)
321321

322-
attr(:field, Phoenix.HTML.FormField,
323-
doc: "a form field struct retrieved from the form, for example: @form[:email]"
324-
)
322+
attr(:field, Phoenix.HTML.FormField, doc: "a form field struct retrieved from the form, for example: @form[:email]")
325323

326324
attr(:errors, :list, default: [])
327325
attr(:checked, :boolean, doc: "the checked flag for checkbox inputs")
328326
attr(:prompt, :string, default: nil, doc: "the prompt for select inputs")
329327
attr(:options, :list, doc: "the options to pass to Phoenix.HTML.Form.options_for_select/2")
330328
attr(:multiple, :boolean, default: false, doc: "the multiple flag for select inputs")
331329

332-
attr(:rest, :global,
333-
include: ~w(accept autocomplete capture cols disabled form list max maxlength min minlength
334-
multiple pattern placeholder readonly required rows size step)
335-
)
330+
attr(:rest, :global, include: ~w(accept autocomplete capture cols disabled form list max maxlength min minlength
331+
multiple pattern placeholder readonly required rows size step))
336332

337333
def input(%{field: %Phoenix.HTML.FormField{} = field} = assigns) do
338334
errors = if Phoenix.Component.used_input?(field), do: field.errors, else: []
@@ -878,8 +874,7 @@ defmodule PeekAppSDK.UI.CoreComponents do
878874
to: selector,
879875
time: 300,
880876
transition:
881-
{"transition-all transform ease-out duration-300",
882-
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
877+
{"transition-all transform ease-out duration-300", "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
883878
"opacity-100 translate-y-0 sm:scale-100"}
884879
)
885880
end
@@ -889,8 +884,7 @@ defmodule PeekAppSDK.UI.CoreComponents do
889884
to: selector,
890885
time: 200,
891886
transition:
892-
{"transition-all transform ease-in duration-200",
893-
"opacity-100 translate-y-0 sm:scale-100",
887+
{"transition-all transform ease-in duration-200", "opacity-100 translate-y-0 sm:scale-100",
894888
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}
895889
)
896890
end
@@ -972,8 +966,8 @@ defmodule PeekAppSDK.UI.CoreComponents do
972966
{render_slot(@inner_block)}
973967
</div>
974968
<%= unless @top_caret do %>
975-
<div class="w-0 h-0 border-l-[6px] border-l-transparent border-r-[6px] border-r-transparent border-t-[6px] border-t-black"></div>
976-
<% end %>
969+
<div class="w-0 h-0 border-l-[6px] border-l-transparent border-r-[6px] border-r-transparent border-t-[6px] border-t-black"></div>
970+
<% end %>
977971
</div>
978972
"""
979973
end
@@ -1041,7 +1035,6 @@ defmodule PeekAppSDK.UI.CoreComponents do
10411035
<div :if={@subtext != []} class="text-sm leading-6 text-gray-primary py-2 font-semibold">
10421036
{render_slot(@subtext)}
10431037
</div>
1044-
10451038
</div>
10461039
"""
10471040
end

lib/peek_app_sdk/ui/odyssey/activity_picker.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ defmodule PeekAppSDK.UI.Odyssey.OdysseyActivityPicker do
5454
<div phx-hook="OdysseyActivityPicker" id={"#{@id}_hook"}>
5555
<!-- Hidden input for form value -->
5656
<input type="hidden" name={@field.name} value={process_ids_for_multi_select(@field.value)} />
57-
58-
<!-- Odyssey product picker will be rendered here -->
57+
58+
<!-- Odyssey product picker will be rendered here -->
5959
<div>
6060
<odyssey-product-picker
6161
id={"#{@id}_picker"}

mix.exs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ defmodule PeekAppSDK.MixProject do
9393
links: %{
9494
"GitHub" => "https://github.com/peek-travel/peek_app_sdk"
9595
},
96-
files:
97-
~w(mix.exs lib/** assets/** package.json priv/static/odyssey_hooks.min.js priv/static/odyssey_web_components.min.js)
96+
files: ~w(mix.exs lib/** assets/** package.json priv/static/odyssey_hooks.min.js priv/static/odyssey_web_components.min.js)
9897
]
9998
end
10099
end

0 commit comments

Comments
 (0)