Skip to content

Commit

Permalink
erb_lint autocorrect other linters
Browse files Browse the repository at this point in the history
  • Loading branch information
toy committed Feb 5, 2025
1 parent c7b066d commit b71a870
Show file tree
Hide file tree
Showing 317 changed files with 525 additions and 698 deletions.
3 changes: 1 addition & 2 deletions app/components/add_button_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
href: dynamic_path)) do |button|
button.with_leading_visual_icon(icon: :plus)
label_text
end
%>
end %>
2 changes: 1 addition & 1 deletion app/components/admin/design_header_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ See COPYRIGHT and LICENSE files for more details.
header.with_breadcrumbs([{ href: admin_index_path, text: t(:label_administration) },
t(:label_custom_style)])
header.with_description { t(:label_custom_style_description) }

if @tabs.present?
header.with_tab_nav(label: nil) do |tab_nav|
@tabs.each do |tab|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ See COPYRIGHT and LICENSE files for more details.
class: "simple-filters--filter-value"
}
)
%>
%>
</li>
<% end %>
<% if has_shares? %>
Expand Down
3 changes: 1 addition & 2 deletions app/components/members/role_form_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ See COPYRIGHT and LICENSE files for more details.
member.roles.include?(role),
role.name,
disabled: role_disabled?(role),
no_label: true
%>
no_label: true %>
<%= role %>
</label>
<% end %>
Expand Down
3 changes: 2 additions & 1 deletion app/components/op_primer/border_box_row_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ See COPYRIGHT and LICENSE files for more details.
tag: :div,
id: row_css_id,
classes: "#{table.grid_class} #{row_css_class}"
) do %>
) do
%>
<% columns.each do |column| %>
<%= render(Primer::BaseComponent.new(tag: :div, classes: grid_column_classes(column), **column_args(column))) do %>
<% label = mobile_label(column) %>
Expand Down
4 changes: 2 additions & 2 deletions app/components/op_turbo/frame_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<% if options[:lazy] == true %>
<turbo-frame id="<%=turbo_frame_id%>" src="<%= options[:lazy_source] %>" loading="lazy">
<turbo-frame id="<%= turbo_frame_id %>" src="<%= options[:lazy_source] %>" loading="lazy">
<%= content %>
</turbo-frame>
<% else %>
<turbo-frame id="<%=turbo_frame_id%>">
<turbo-frame id="<%= turbo_frame_id %>">
<%= content %>
</turbo-frame>
<% end %>
12 changes: 4 additions & 8 deletions app/components/open_project/common/attribute_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
data: {
"attribute-target": "descriptionText"
})
) { short_text }
%>
) { short_text } %>

<%= render(
Primer::Beta::Text.new(tag: :div,
display: display_expand_button_value,
classes: "op-long-text-attribute--text-hider",
data: { "attribute-target": "textHider" })
)
%>
) %>

<%= render(
Primer::Alpha::HiddenTextExpander.new(inline: false,
Expand All @@ -33,8 +31,7 @@
},
button_arguments: { "data-show-dialog-id": id },
classes: "op-long-text-attribute--text-expander")
)
%>
) %>

<%= render(
Primer::Alpha::Dialog.new(id: id,
Expand All @@ -46,6 +43,5 @@
) do |component|
component.with_body { full_text }
component.with_header(variant: :large)
end
%>
end %>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
action: "input->filter--filter-list#filterLists",
"filter--filter-list-target": "filter",
"test-selector": "op-submenu--search-input"
}) %>
}) %>

<%= render Primer::Beta::Text.new(display: :none,
classes: "op-submenu--search-no-results-container",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
inputPlaceholder: I18n.t(:"queries.configure_view.columns.input_placeholder"),
dragAreaLabel: I18n.t(:"queries.configure_view.columns.drag_area_label"),
appendToComponent: true
}%>
} %>
<% end %>
<% end %>
<% tab_panel.with_tab(id: "tab-selects--sorting") do |tab| %>
<% tab.with_text { I18n.t("label_sort") }%>
<% tab.with_text { I18n.t("label_sort") } %>
<% tab.with_panel do %>
<%= render(Queries::SortByComponent.new(query: query, selectable_columns:)) %>
<% end%>
<% end %>
<% end %>
<% end %>
<% end %>
Expand Down
3 changes: 1 addition & 2 deletions app/components/projects/row_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ See COPYRIGHT and LICENSE files for more details.

<tr
<%= "id=\"#{row_css_id}\"".html_safe if row_css_id %>
<%= "class=\"#{row_css_class}\"".html_safe if row_css_class %>
>
<%= "class=\"#{row_css_class}\"".html_safe if row_css_class %>>
<% columns.each do |column| %>
<td class="<%= column_css_class(column) %>">
<%= column_value(column) %>
Expand Down
2 changes: 1 addition & 1 deletion app/components/projects/table_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ See COPYRIGHT and LICENSE files for more details.
<table class="generic-table" data-controller="table-highlighting" <%= table_id ? "id=\"#{table_id}\"".html_safe : "" %>>
<colgroup>
<% columns.each do |column| %>
<col <%= "opHighlightCol" unless column.attribute == :hierarchy %> >
<col <%= "opHighlightCol" unless column.attribute == :hierarchy %>>
<% end %>
<col>
</colgroup>
Expand Down
3 changes: 1 addition & 2 deletions app/components/row_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ See COPYRIGHT and LICENSE files for more details.

<tr
<%= "id=\"#{row_css_id}\"".html_safe if row_css_id %>
<%= "class=\"#{row_css_class}\"".html_safe if row_css_class %>
>
<%= "class=\"#{row_css_class}\"".html_safe if row_css_class %>>
<% columns.each do |column| %>
<td class="<%= column_css_class(column) %>">
<%= column_value(column) %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%- if query_is_public? || query_is_shared? %>
<%= container.with_row { render(Primer::Alpha::Banner.new(icon: :info)) { I18n.t("sharing.project_queries.access_warning") } }%>
<%= container.with_row { render(Primer::Alpha::Banner.new(icon: :info)) { I18n.t("sharing.project_queries.access_warning") } } %>
<%- end %>
3 changes: 2 additions & 1 deletion app/components/users/index_page_header_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { t(:label_user_plural) }
header.with_breadcrumbs(breadcrumb_items)
header.with_description do %>
header.with_description do
%>
<%= t(:label_enterprise_active_users, current: OpenProject::Enterprise.active_user_count, limit: user_limit) %>
&nbsp;
<%= render(Primer::Beta::Button.new(scheme: :primary,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%=
component_wrapper do
render(Primer::Beta::Blankslate.new(
border: true,
border: true,
data: { test_selector: "op-wp-journals-container-empty" }
)) do |component|
component.with_visual_icon(icon: :pulse)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
label: t("activities.work_packages.activity_tab.label_activity_show_all"),
href: update_filter_work_package_activities_path(work_package),
content_arguments: {
data: {
data: {
turbo_stream: true, action: "click->work-packages--activities-tab--index#unsetFilter",
test_selector: "op-wp-journals-filter-show-all"
}
Expand All @@ -24,7 +24,7 @@
label: t("activities.work_packages.activity_tab.label_activity_show_only_changes"),
href: update_filter_work_package_activities_path(work_package, filter: :only_changes),
content_arguments: {
data: {
data: {
turbo_stream: true, action: "click->work-packages--activities-tab--index#setFilterToOnlyChanges",
test_selector: "op-wp-journals-filter-show-only-changes"
}
Expand All @@ -35,7 +35,7 @@
label: t("activities.work_packages.activity_tab.label_activity_show_only_comments"),
href: update_filter_work_package_activities_path(work_package, filter: :only_comments),
content_arguments: {
data: {
data: {
turbo_stream: true, action: "click->work-packages--activities-tab--index#setFilterToOnlyComments",
test_selector: "op-wp-journals-filter-show-only-comments"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%=
<%=
component_wrapper(class: "work-packages-activities-tab-journals-item-component-details") do
flex_layout(
my: 0,
Expand All @@ -25,5 +25,5 @@
render_details(details_container)
end
end
end
%>
end
%>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%=
component_wrapper(class: "work-packages-activities-tab-journals-item-component") do
flex_layout(data: {
flex_layout(data: {
test_selector: "op-wp-revision-entry-#{changeset.id}"
}) do |revision_container|
revision_container.with_row do
Expand Down Expand Up @@ -78,4 +78,4 @@
end
end
end
%>
%>
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
inputLabel: label,
inputPlaceholder: I18n.t(:"queries.configure_view.columns.input_placeholder"),
dragAreaLabel: I18n.t(:"queries.configure_view.columns.drag_area_label")
}
%>
} %>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
flex_layout(data: {
"application-target": "dynamic",
controller: "work-packages--export--pdf--settings"
}) do |container| %>
}) do |container|
%>
<%= container.with_row do %>
<%= render(Primer::Alpha::RadioButtonGroup.new(
full_width: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
inputCaption: I18n.t(:"export.dialog.pdf.long_text_fields.input_caption"),
inputPlaceholder: I18n.t(:"export.dialog.pdf.long_text_fields.input_placeholder"),
dragAreaLabel: I18n.t(:"export.dialog.pdf.long_text_fields.drag_area_label")
}
%>
} %>
<% end %>
<%= container.with_row do |_pdf_report_images| %>
<%= render OpenProject::Common::DividerComponent.new %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
<%= render(Primer::Beta::Button.new(scheme: :primary,
type: :submit)) { I18n.t(:button_save) } %>
<% end %>
<% end%>
<% end %>
<% end %>
<% else%>
<% else %>
<%= form_flex_container.with_row(flex_layout: true,
justify_content: :flex_end) do |actions_row| %>
<%= actions_row.with_column(mr: 2) do %>
Expand All @@ -46,7 +46,7 @@
type: :submit)) { I18n.t(:button_set_reminder) } %>
<% end %>
<% end %>
<% end%>
<% end %>
<% end %>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/account/_auth_providers.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ wclass = local_assigns[:wide] ? "wide" : ""
<% unless no_pwd %>
<h3 class="login-auth-providers-title mb-3">
<span>
<%= local_assigns[:omniauth_title] || I18n.t("account.login_with_auth_provider")%>
<%= local_assigns[:omniauth_title] || I18n.t("account.login_with_auth_provider") %>
</span>
</h3>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/account/_login.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ See COPYRIGHT and LICENSE files for more details.
&nbsp;
</label>
<input type="submit" name="login" id="login-pulldown"
value="<%=t(:button_login)%>" class="button -primary button_no-margin" tabindex="1" />
value="<%= t(:button_login) %>" class="button -primary button_no-margin" tabindex="1">
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions app/views/account/_register.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ See COPYRIGHT and LICENSE files for more details.
<%= call_hook :view_account_register_after_basic_information, f: f %>
<%= render partial: "customizable/form",
locals: { form: f, all_fields: false, only_required: true, wide_labels: true } %>
<br/>
<br/>
<br>
<br>
<% if @user.change_password_allowed? %>
<div class="form--field -required -wide-label -reduced-margin">
<%= f.password_field :password,
Expand All @@ -86,7 +86,7 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
</section>
<% if user_consent_required? %>
<hr/>
<hr>
<%= render partial: "account/user_consent_check" %>
<% end %>
<%= render partial: "account/auth_providers", locals: { omniauth_title: I18n.t("account.signup_with_auth_provider"), wide: true } %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/account/_user_consent_check.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<label class="form--label-with-check-box -required -no-ellipsis op-user-consent-form--agreement">
<div class="form--check-box-container">
<input type="checkbox" name="consent_check" class="form--check-box" required="required" />
<input type="checkbox" name="consent_check" class="form--check-box" required="required">
</div>

<%= format_text consent_checkbox_label %>
Expand Down
1 change: 0 additions & 1 deletion app/views/account/consent.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ See COPYRIGHT and LICENSE files for more details.
<%= call_hook :view_account_consent_top %>
<div id="login-form" class="account-consent form -bordered">


<%= form_tag(account_confirm_consent_path, method: :post, class: "form -wide-labels") do %>
<%= render partial: "user_consent_check" %>
<section class="form--section">
Expand Down
5 changes: 2 additions & 3 deletions app/views/account/exit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ See COPYRIGHT and LICENSE files for more details.
++#%>

<%# LOCALS
fail ArgumentError, "missing instructions" unless defined? instructions
%>
fail ArgumentError, "missing instructions" unless defined? instructions %>

<% html_title t(:label_login) %>
<% breadcrumb_paths(t(:label_login)) %>
Expand All @@ -42,7 +41,7 @@ See COPYRIGHT and LICENSE files for more details.

<div id="login-form" class="form -bordered">
<h1><%= I18n.t(:label_login) %></h1>
<hr class="form--separator" />
<hr class="form--separator">
<p><%= instruction_text.html_safe %></p>
</div>
<%= call_hook :view_account_login_bottom %>
2 changes: 1 addition & 1 deletion app/views/account/login.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ See COPYRIGHT and LICENSE files for more details.
<div id="login-form" class="form -bordered">
<h1><%= I18n.t(:label_login) %></h1>

<hr class="form--separator" />
<hr class="form--separator">
<% unless OpenProject::Configuration.disable_password_login? %>
<%= render partial: "password_login_form" %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/activities/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ See COPYRIGHT and LICENSE files for more details.
end
%>

<%= render(Activities::DaysComponent.new(events: @events, current_project: @project, activity_page: @activity_page)) %>
<%= render(Activities::DaysComponent.new(events: @events, current_project: @project, activity_page: @activity_page)) %>

<% if @events.empty? %>
<%= no_results_box %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/backups/reset_token.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ See COPYRIGHT and LICENSE files for more details.
).html_safe %>
</p>
<div class="danger-zone--verification">
<input type="text" name="login_verification"/>
<input type="text" name="login_verification">
<%= styled_button_tag "", class: "-primary", disabled: true do
concat content_tag :i, "", class: "button--icon icon-#{icon}"
concat content_tag :span, t("backup.reset_token.action_#{action}"), class: "button--text"
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/plugins.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ See COPYRIGHT and LICENSE files for more details.
<tbody>
<% @plugins.each do |plugin| %>
<tr>
<td><span class="name"><%=h plugin.name %></span>
<td><span class="name"><%= h plugin.name %></span>
<%= content_tag("span", plugin.description, class: "description") if plugin.description.present? %>
<%= content_tag("span", link_to(plugin.url, plugin.url), class: "url") if plugin.url.present? %>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ See COPYRIGHT and LICENSE files for more details.
webhook_link: link_to(t(:"admin.journal_aggregation.explanation.link"),
admin_outgoing_webhooks_path,
target: "_blank", rel: "noopener")).html_safe %>
<br/>
<br>
<%= t(:text_hint_disable_with_0) %>
</span>
</div>
Expand Down
Loading

0 comments on commit b71a870

Please sign in to comment.