~cytrogen/masto-fe

e663e6d2c21cabaa5a2453cffe81daaa06c86728 — Matt Jankowski 2 years ago 6245cec
Fix haml-lint `ConsecutiveSilentScripts` rule (#26043)

M .haml-lint_todo.yml => .haml-lint_todo.yml +1 -8
@@ 1,6 1,6 @@
# This configuration was generated by
# `haml-lint --auto-gen-config`
# on 2023-07-17 12:00:21 -0400 using Haml-Lint version 0.48.0.
# on 2023-07-17 15:30:11 -0400 using Haml-Lint version 0.48.0.
# The point is for the user to remove these configuration records
# one by one as the lints are removed from the code base.
# Note that changes in the inspected code, or installation of new


@@ 41,13 41,6 @@ linters:
      - 'app/views/shared/_og.html.haml'
      - 'app/views/statuses/_status.html.haml'

  # Offense count: 6
  ConsecutiveSilentScripts:
    exclude:
      - 'app/views/admin/settings/shared/_links.html.haml'
      - 'app/views/settings/login_activities/_login_activity.html.haml'
      - 'app/views/statuses/_poll.html.haml'

  # Offense count: 3
  IdNames:
    exclude:

M app/views/admin/settings/shared/_links.html.haml => app/views/admin/settings/shared/_links.html.haml +7 -6
@@ 1,8 1,9 @@
.content__heading__tabs
  = render_navigation renderer: :links do |primary|
    - primary.item :branding, safe_join([fa_icon('pencil fw'), t('admin.settings.branding.title')]), admin_settings_branding_path
    - primary.item :about, safe_join([fa_icon('file-text fw'), t('admin.settings.about.title')]), admin_settings_about_path
    - primary.item :registrations, safe_join([fa_icon('users fw'), t('admin.settings.registrations.title')]), admin_settings_registrations_path
    - primary.item :discovery, safe_join([fa_icon('search fw'), t('admin.settings.discovery.title')]), admin_settings_discovery_path
    - primary.item :content_retention, safe_join([fa_icon('history fw'), t('admin.settings.content_retention.title')]), admin_settings_content_retention_path
    - primary.item :appearance, safe_join([fa_icon('desktop fw'), t('admin.settings.appearance.title')]), admin_settings_appearance_path
    :ruby
      primary.item :branding, safe_join([fa_icon('pencil fw'), t('admin.settings.branding.title')]), admin_settings_branding_path
      primary.item :about, safe_join([fa_icon('file-text fw'), t('admin.settings.about.title')]), admin_settings_about_path
      primary.item :registrations, safe_join([fa_icon('users fw'), t('admin.settings.registrations.title')]), admin_settings_registrations_path
      primary.item :discovery, safe_join([fa_icon('search fw'), t('admin.settings.discovery.title')]), admin_settings_discovery_path
      primary.item :content_retention, safe_join([fa_icon('history fw'), t('admin.settings.content_retention.title')]), admin_settings_content_retention_path
      primary.item :appearance, safe_join([fa_icon('desktop fw'), t('admin.settings.appearance.title')]), admin_settings_appearance_path

M app/views/settings/login_activities/_login_activity.html.haml => app/views/settings/login_activities/_login_activity.html.haml +4 -3
@@ 1,6 1,7 @@
- method_str = content_tag(:span, login_activity.omniauth? ? t(login_activity.provider, scope: 'auth.providers') : t(login_activity.authentication_method, scope: 'login_activities.authentication_methods'), class: 'target')
- ip_str = content_tag(:span, login_activity.ip, class: 'target')
- browser_str = content_tag(:span, t('sessions.description', browser: t("sessions.browsers.#{login_activity.browser}", default: login_activity.browser.to_s), platform: t("sessions.platforms.#{login_activity.platform}", default: login_activity.platform.to_s)), class: 'target', title: login_activity.user_agent)
:ruby
  method_str = content_tag(:span, login_activity.omniauth? ? t(login_activity.provider, scope: 'auth.providers') : t(login_activity.authentication_method, scope: 'login_activities.authentication_methods'), class: 'target')
  ip_str = content_tag(:span, login_activity.ip, class: 'target')
  browser_str = content_tag(:span, t('sessions.description', browser: t("sessions.browsers.#{login_activity.browser}", default: login_activity.browser.to_s), platform: t("sessions.platforms.#{login_activity.platform}", default: login_activity.platform.to_s)), class: 'target', title: login_activity.user_agent)

.log-entry
  .log-entry__header

M app/views/statuses/_poll.html.haml => app/views/statuses/_poll.html.haml +4 -3
@@ 1,6 1,7 @@
- show_results = (user_signed_in? && poll.voted?(current_account)) || poll.expired?
- own_votes = user_signed_in? ? poll.own_votes(current_account) : []
- total_votes_count = poll.voters_count || poll.votes_count
:ruby
  show_results = (user_signed_in? && poll.voted?(current_account)) || poll.expired?
  own_votes = user_signed_in? ? poll.own_votes(current_account) : []
  total_votes_count = poll.voters_count || poll.votes_count

.poll
  %ul