1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Added lints for ERB templates (#609)

* Added erblint and fixed offenses

* Added erblint bintstub. Included erblint into CI

* Merged GitHub Actions tasks for rubocop and erblint into one

* Added config for erblint.

* Reverted erblint call in the CI
This commit is contained in:
Igor Alexandrov 2024-04-09 16:08:58 +04:00 committed by GitHub
parent 21e2d05d0c
commit b5c56f7775
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
49 changed files with 201 additions and 160 deletions

View file

@ -1,5 +1,5 @@
<% flash.each do |type, msg| %>
<div class="p-4 <%= type == 'notice' ? 'bg-blue-200' : 'bg-red-200' %> rounded-lg"><%= msg %></div>
<div class="p-4 <%= type == "notice" ? "bg-blue-200" : "bg-red-200" %> rounded-lg"><%= msg %></div>
<% end %>
<% errors.each do |message| %>

View file

@ -20,4 +20,4 @@
<span class="text-sm text-gray-500"><%= period_label(period) %></span>
</div>
<% end %>
</div>
</div>

View file

@ -2,15 +2,15 @@
<form method="dialog" class="p-4">
<div class="flex flex-col mb-4">
<div class="flex justify-between mb-2 gap-4">
<h3 id="turbo-confirm-title" class="font-medium text-md"><%= t('custom_turbo_confirm.default.title') %></h3>
<h3 id="turbo-confirm-title" class="font-medium text-md"><%= t("custom_turbo_confirm.default.title") %></h3>
<button value="cancel">
<%= lucide_icon("x", class: "w-5 h-5 shrink-0 text-gray-500") %>
</button>
</div>
<div id="turbo-confirm-body" class="text-gray-500 text-sm">
<%= t('custom_turbo_confirm.default.body_html') %>
<%= t("custom_turbo_confirm.default.body_html") %>
</div>
</div>
<button id="turbo-confirm-accept" class="w-full text-red-600 rounded-xl text-center p-[10px] border" value="confirm"><%= t('custom_turbo_confirm.default.accept') %></button>
<button id="turbo-confirm-accept" class="w-full text-red-600 rounded-xl text-center p-[10px] border" value="confirm"><%= t("custom_turbo_confirm.default.accept") %></button>
</form>
</dialog>
</dialog>

View file

@ -5,4 +5,4 @@
<div class="w-full h-full flex items-center justify-center">
<p class="text-gray-500">No data available for the selected period.</p>
</div>
<% end %>
<% end %>

View file

@ -1 +1 @@
<%= link_to image_tag("logomark.svg", class: 'w-auto h-12 mx-auto'), root_path, data: { turbo: false} %>
<%= link_to image_tag("logomark.svg", class: "w-auto h-12 mx-auto"), root_path, data: { turbo: false} %>

View file

@ -1,5 +1,5 @@
<%# locals: (value: 'last_30_days') -%>
<% options = [['7D', 'last_7_days'], ['1M', 'last_30_days'], ["1Y", "last_365_days"], ['All', 'all']] %>
<% options = [["7D", "last_7_days"], ["1M", "last_30_days"], ["1Y", "last_365_days"], ["All", "all"]] %>
<div data-controller="select" data-select-active-class="bg-alpha-black-50" class="relative" data-select-selected-value="<%= value %>">
<button type="button" data-select-target="button" class="flex items-center gap-1 w-full border border-alpha-black-100 shadow-xs rounded-lg text-sm p-2 cursor-pointer">
<span data-select-target="buttonText" class="text-gray-900 text-sm"><%= options.find { |option| option[1] == value }[0] %></span>

View file

@ -7,4 +7,4 @@
<circle class="fill-transparent stroke-current text-gray-300" r="<%= radius %>" cx="<%= radius + stroke / 2 %>" cy="<%= radius + stroke / 2 %>" stroke-width="<%= stroke %>" />
<!-- Foreground Circle -->
<circle class="fill-transparent stroke-current <%= text_class %>" r="<%= radius %>" cx="<%= radius + stroke / 2 %>" cy="<%= radius + stroke / 2 %>" stroke-width="<%= stroke %>" stroke-dasharray="<%= circumference %>" stroke-dashoffset="<%= stroke_dashoffset %>" transform="rotate(-90, <%= radius + stroke / 2 %>, <%= radius + stroke / 2 %>)" />
</svg>
</svg>

View file

@ -11,4 +11,4 @@
</div>
</div>
</dialog>
<% end %>
<% end %>

View file

@ -7,4 +7,4 @@
<span><%= styles[:symbol] %><%= format_money trend.value.abs %></span>
<span>(<%= lucide_icon(styles[:icon], class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent %>%)</span>
<% end %>
</p>
</p>