From ed157dc95250dd7a61deb412f3ef5b025bdb378b Mon Sep 17 00:00:00 2001 From: Alex Turchyn Date: Wed, 28 Jun 2023 01:27:23 +0300 Subject: [PATCH] fix erblint --- .dockerignore | 2 +- app/views/dashboard/index.html.erb | 4 ++-- app/views/devise/passwords/edit.html.erb | 2 +- app/views/devise/shared/_error_messages.html.erb | 6 +++--- app/views/icons/_brand_docker.html.erb | 2 +- app/views/icons/_brand_github.html.erb | 2 +- app/views/icons/_calendar.html.erb | 2 +- app/views/icons/_clipboard.html.erb | 2 +- app/views/icons/_clipboard_copy.html.erb | 2 +- app/views/icons/_copy.html.erb | 2 +- app/views/icons/_devices.html.erb | 2 +- app/views/icons/_download.html.erb | 2 +- app/views/icons/_loader.html.erb | 2 +- app/views/icons/_login.html.erb | 2 +- app/views/icons/_mail_forward.html.erb | 2 +- app/views/icons/_pencil.html.erb | 2 +- app/views/icons/_save.html.erb | 2 +- app/views/icons/_shield_check.html.erb | 2 +- app/views/icons/_trash.html.erb | 2 +- app/views/icons/_user_plus.html.erb | 2 +- app/views/pages/landing.html.erb | 2 +- app/views/shared/_button_title.html.erb | 2 +- app/views/shared/_pagination.html.erb | 4 ++-- app/views/shared/_settings_nav.html.erb | 10 +++++----- app/views/start_form/show.html.erb | 4 ++-- app/views/storage_settings/_azure_form.html.erb | 2 +- app/views/storage_settings/_google_cloud_form.html.erb | 2 +- app/views/storage_settings/index.html.erb | 10 +++++----- app/views/submissions/_value.html.erb | 2 +- app/views/submissions/new.html.erb | 10 +++++----- app/views/submissions/show.html.erb | 8 ++++---- app/views/submit_form/completed.html.erb | 4 ++-- app/views/templates/show.html.erb | 4 ++-- 33 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.dockerignore b/.dockerignore index 00f9ff1b..c085d97c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -23,7 +23,7 @@ /config/master.key /public/packs-test -LICENSE +/public/packs /attachments /docuseal .DS_Store diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index a3a80b60..2b56d230 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -13,7 +13,7 @@
<%= template.name %>
-
+

<%= svg_icon('user', class: 'w-4 h-4') %> <%= template.author.full_name %> @@ -31,7 +31,7 @@ <%= svg_icon('copy', class: 'w-4 h-4') %> - <%= button_to template_path(template), data: { turbo_confirm: 'Are you sure?' }, method: :delete, class: "btn btn-xs btn-outline bg-base-200 btn-circle" do %> + <%= button_to template_path(template), data: { turbo_confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-xs btn-outline bg-base-200 btn-circle' do %> <%= svg_icon('trash', class: 'w-4 h-4 enabled') %> <%= svg_icon('loader', class: 'w-4 h-4 animate-spin disabled') %> <% end %> diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index f55f112d..b67ad080 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -2,7 +2,7 @@

Change your password

<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: 'space-y-6' }) do |f| %>
- <%= render 'devise/shared/error_messages', resource: resource %> + <%= render 'devise/shared/error_messages', resource: %> <%= f.hidden_field :reset_password_token %>
<%= f.label :password, 'New password', class: 'label' %> diff --git a/app/views/devise/shared/_error_messages.html.erb b/app/views/devise/shared/_error_messages.html.erb index ddc4b7fa..371bb71c 100644 --- a/app/views/devise/shared/_error_messages.html.erb +++ b/app/views/devise/shared/_error_messages.html.erb @@ -1,12 +1,12 @@ <% if resource.errors.any? %>
- <%= svg_icon('x_circle', class: 'stroke-current shrink-0 h-6 w-6') %> + <%= svg_icon('x_circle', class: 'stroke-current shrink-0 h-6 w-6') %>

<%= I18n.t('errors.messages.not_saved', - count: resource.errors.count, - resource: resource.class.model_name.human.downcase) %>

+ count: resource.errors.count, + resource: resource.class.model_name.human.downcase) %> <% resource.errors.full_messages.each do |message| %>

<%= message %>

<% end %> diff --git a/app/views/icons/_brand_docker.html.erb b/app/views/icons/_brand_docker.html.erb index 852f26f5..bbac741e 100644 --- a/app/views/icons/_brand_docker.html.erb +++ b/app/views/icons/_brand_docker.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_brand_github.html.erb b/app/views/icons/_brand_github.html.erb index 7fd84f58..e2a7227d 100644 --- a/app/views/icons/_brand_github.html.erb +++ b/app/views/icons/_brand_github.html.erb @@ -1,4 +1,4 @@ - + diff --git a/app/views/icons/_calendar.html.erb b/app/views/icons/_calendar.html.erb index 83b73501..50a955eb 100644 --- a/app/views/icons/_calendar.html.erb +++ b/app/views/icons/_calendar.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_clipboard.html.erb b/app/views/icons/_clipboard.html.erb index 24d6c84d..a2b0c460 100644 --- a/app/views/icons/_clipboard.html.erb +++ b/app/views/icons/_clipboard.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_clipboard_copy.html.erb b/app/views/icons/_clipboard_copy.html.erb index 2a3fc905..ecaec169 100644 --- a/app/views/icons/_clipboard_copy.html.erb +++ b/app/views/icons/_clipboard_copy.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_copy.html.erb b/app/views/icons/_copy.html.erb index 432d5f26..fe228b75 100644 --- a/app/views/icons/_copy.html.erb +++ b/app/views/icons/_copy.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_devices.html.erb b/app/views/icons/_devices.html.erb index 8dc04ee1..c5d2d3b7 100644 --- a/app/views/icons/_devices.html.erb +++ b/app/views/icons/_devices.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_download.html.erb b/app/views/icons/_download.html.erb index bd8b92ae..752e8e4e 100644 --- a/app/views/icons/_download.html.erb +++ b/app/views/icons/_download.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_loader.html.erb b/app/views/icons/_loader.html.erb index d85132d0..aab094f1 100644 --- a/app/views/icons/_loader.html.erb +++ b/app/views/icons/_loader.html.erb @@ -1,4 +1,4 @@ - + diff --git a/app/views/icons/_login.html.erb b/app/views/icons/_login.html.erb index b2353b02..a0de253e 100644 --- a/app/views/icons/_login.html.erb +++ b/app/views/icons/_login.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_mail_forward.html.erb b/app/views/icons/_mail_forward.html.erb index f2e09dca..5f883b8f 100644 --- a/app/views/icons/_mail_forward.html.erb +++ b/app/views/icons/_mail_forward.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_pencil.html.erb b/app/views/icons/_pencil.html.erb index 6c16e35c..f23b4181 100644 --- a/app/views/icons/_pencil.html.erb +++ b/app/views/icons/_pencil.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_save.html.erb b/app/views/icons/_save.html.erb index 3a59fc2c..c2aaa67b 100644 --- a/app/views/icons/_save.html.erb +++ b/app/views/icons/_save.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_shield_check.html.erb b/app/views/icons/_shield_check.html.erb index 55b20c95..322f7fc5 100644 --- a/app/views/icons/_shield_check.html.erb +++ b/app/views/icons/_shield_check.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_trash.html.erb b/app/views/icons/_trash.html.erb index 8ccee7ff..972f7f95 100644 --- a/app/views/icons/_trash.html.erb +++ b/app/views/icons/_trash.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/icons/_user_plus.html.erb b/app/views/icons/_user_plus.html.erb index f8f7e66a..935d26d0 100644 --- a/app/views/icons/_user_plus.html.erb +++ b/app/views/icons/_user_plus.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/pages/landing.html.erb b/app/views/pages/landing.html.erb index 54d35ca8..63d46b46 100644 --- a/app/views/pages/landing.html.erb +++ b/app/views/pages/landing.html.erb @@ -3,7 +3,7 @@
- <%= render 'shared/logo', width: "100", height: "100" %> + <%= render 'shared/logo', width: '100', height: '100' %>

DocuSeal

diff --git a/app/views/shared/_button_title.html.erb b/app/views/shared/_button_title.html.erb index d66746f9..05727d78 100644 --- a/app/views/shared/_button_title.html.erb +++ b/app/views/shared/_button_title.html.erb @@ -1,6 +1,6 @@ - <%= icon if icon %> + <%= icon %> <%= title %> diff --git a/app/views/shared/_pagination.html.erb b/app/views/shared/_pagination.html.erb index 18588d09..3ff8358c 100644 --- a/app/views/shared/_pagination.html.erb +++ b/app/views/shared/_pagination.html.erb @@ -6,7 +6,7 @@
<% if @pagy.prev %> - <%== link.call(@pagy.prev, "«", 'class="join-item btn min-h-full h-10"') %> + <%== link.call(@pagy.prev, '«', 'class="join-item btn min-h-full h-10"') %> <% else %> « <% end %> @@ -14,7 +14,7 @@ Page <%= @pagy.page %> <% if @pagy.next %> - <%== link.call(@pagy.next, "»", 'class="join-item btn min-h-full h-10"') %> + <%== link.call(@pagy.next, '»', 'class="join-item btn min-h-full h-10"') %> <% else %> » <% end %> diff --git a/app/views/shared/_settings_nav.html.erb b/app/views/shared/_settings_nav.html.erb index 06c1c112..0385b6e9 100644 --- a/app/views/shared/_settings_nav.html.erb +++ b/app/views/shared/_settings_nav.html.erb @@ -4,19 +4,19 @@
  • - <%= link_to 'Profile', settings_profile_index_path, class: "text-base hover:bg-base-300" %> + <%= link_to 'Profile', settings_profile_index_path, class: 'text-base hover:bg-base-300' %>
  • - <%= link_to 'Email', settings_email_index_path, class: "text-base hover:bg-base-300" %> + <%= link_to 'Email', settings_email_index_path, class: 'text-base hover:bg-base-300' %>
  • - <%= link_to 'Storage', settings_storage_index_path, class: "text-base hover:bg-base-300" %> + <%= link_to 'Storage', settings_storage_index_path, class: 'text-base hover:bg-base-300' %>
  • - <%= link_to 'eSign', settings_esign_index_path, class: "text-base hover:bg-base-300" %> + <%= link_to 'eSign', settings_esign_index_path, class: 'text-base hover:bg-base-300' %>
  • - <%= link_to 'Team', settings_users_path, class: "text-base hover:bg-base-300" %> + <%= link_to 'Team', settings_users_path, class: 'text-base hover:bg-base-300' %>
  • diff --git a/app/views/start_form/show.html.erb b/app/views/start_form/show.html.erb index 58dfd599..177e7a68 100644 --- a/app/views/start_form/show.html.erb +++ b/app/views/start_form/show.html.erb @@ -6,7 +6,7 @@
    - <%= render 'shared/logo', width: "50px", height: "50px"%> + <%= render 'shared/logo', width: '50px', height: '50px' %>

    DocuSeal

    @@ -16,7 +16,7 @@
    - + diff --git a/app/views/storage_settings/_azure_form.html.erb b/app/views/storage_settings/_azure_form.html.erb index 1e2a7bea..83f126cc 100644 --- a/app/views/storage_settings/_azure_form.html.erb +++ b/app/views/storage_settings/_azure_form.html.erb @@ -8,7 +8,7 @@
    <%= fff.label :container, class: 'label' %> - <%= fff.text_field :container, value: configs['container'], required: true , class: 'base-input' %> + <%= fff.text_field :container, value: configs['container'], required: true, class: 'base-input' %>
    diff --git a/app/views/storage_settings/_google_cloud_form.html.erb b/app/views/storage_settings/_google_cloud_form.html.erb index d031aa2d..c8bdc44f 100644 --- a/app/views/storage_settings/_google_cloud_form.html.erb +++ b/app/views/storage_settings/_google_cloud_form.html.erb @@ -8,7 +8,7 @@
    <%= fff.label :bucket, class: 'label' %> - <%= fff.text_field :bucket, value: value['service'] == 'google' ? configs['bucket'] : '', required: true , class: 'base-input' %> + <%= fff.text_field :bucket, value: value['service'] == 'google' ? configs['bucket'] : '', required: true, class: 'base-input' %>
    diff --git a/app/views/storage_settings/index.html.erb b/app/views/storage_settings/index.html.erb index 60493964..09869b54 100644 --- a/app/views/storage_settings/index.html.erb +++ b/app/views/storage_settings/index.html.erb @@ -8,7 +8,7 @@ <% value = @encrypted_config.value || { 'service' => 'disk' } %> <% configs = value['configs'] || {} %> <%= form_for @encrypted_config, url: settings_storage_index_path, method: :post, html: { autocomplete: 'off', class: 'w-full' } do |f| %> - <% options = [['Disk', 'disk'], ['AWS', 'aws_s3'], ['GCP', 'google'], ['Azure', 'azure']] %> + <% options = [%w[Disk disk], %w[AWS aws_s3], %w[GCP google], %w[Azure azure]] %>
      <% options.each do |(label, val)| %> @@ -24,16 +24,16 @@
    - <%= render "disk_form", f: f %> + <%= render 'disk_form', f: %> - <%= render "aws_form", f: f, configs: configs, value: value %> + <%= render 'aws_form', f:, configs:, value: %> - <%= render "google_cloud_form", f: f, configs: configs, value: value %> + <%= render 'google_cloud_form', f:, configs:, value: %> - <%= render "azure_form", f: f, configs: configs, value: value %> + <%= render 'azure_form', f:, configs:, value: %>
    <%= f.button button_title(title: 'Save', disabled_with: 'Saving'), class: 'base-button' %> diff --git a/app/views/submissions/_value.html.erb b/app/views/submissions/_value.html.erb index 1f7c70d4..aaf7d1fb 100644 --- a/app/views/submissions/_value.html.erb +++ b/app/views/submissions/_value.html.erb @@ -5,7 +5,7 @@
    <% Array.wrap(value).each do |val| %> - <%= svg_icon('paperclip', class: "inline w-[1.5vw] h-[1.5vw] lg:w-4 lg:h-4") %> + <%= svg_icon('paperclip', class: 'inline w-[1.5vw] h-[1.5vw] lg:w-4 lg:h-4') %> <%= attachments_index[val].filename %> <% end %> diff --git a/app/views/submissions/new.html.erb b/app/views/submissions/new.html.erb index 93ed785a..162e8ea6 100644 --- a/app/views/submissions/new.html.erb +++ b/app/views/submissions/new.html.erb @@ -1,5 +1,5 @@ <%= render 'shared/turbo_modal', title: 'New Recipients' do %> - <%= form_for '', url: template_submissions_path(@template), html: { class: 'space-y-4' }, data: { turbo_frame: :_top } do |f| %> + <%= form_for '', url: template_submissions_path(@template), html: { class: 'space-y-4', autocomplete: 'off' }, data: { turbo_frame: :_top } do |f| %> <% if @template.submitters.size == 1 %>
    <%= f.label :emails, class: 'label' %> @@ -21,8 +21,8 @@ - - + +
    <% end %>
    @@ -38,7 +38,7 @@
    <% is_smtp_configured = Docuseal.multitenant? || current_account.encrypted_configs.exists?(key: EncryptedConfig::EMAIL_SMTP_KEY) %> <%= f.label :send_email, class: 'flex items-center cursor-pointer' do %> - <%= f.check_box :send_email, class: 'base-checkbox', disabled: !is_smtp_configured, onchange: "message_field.classList.toggle('hidden', !event.currentTarget.checked)" %> + <%= f.check_box :send_email, class: 'base-checkbox', disabled: !is_smtp_configured, onchange: "message_field.classList.toggle('hidden', !event.currentTarget.checked)" %> Send Email <% end %> <% unless is_smtp_configured %> @@ -62,7 +62,7 @@ <%= f.text_area :message, value: format(SubmitterMailer::DEFAULT_MESSAGE, name: @template.name), required: true, class: 'base-textarea !rounded-lg' %> Thanks, -
    +
    <%= current_account.name %>
    diff --git a/app/views/submissions/show.html.erb b/app/views/submissions/show.html.erb index 7c333f81..db13f280 100644 --- a/app/views/submissions/show.html.erb +++ b/app/views/submissions/show.html.erb @@ -24,7 +24,7 @@ <% @submission.template.schema.each do |item| %> <% document = @submission.template.documents.find { |a| item['attachment_uuid'] == a.uuid } %> " onclick="[event.preventDefault(), window[event.target.closest('a').href.split('#')[1]].scrollIntoView({ behavior: 'smooth', block: 'start' })]" class="block cursor-pointer"> - +
    <%= item['name'].presence || document.filename.base %>
    @@ -54,7 +54,7 @@
    - <% colors = ['bg-red-500', 'bg-sky-500', 'bg-emerald-500', 'bg-yellow-300', 'bg-purple-600'] %> + <% colors = %w[bg-red-500 bg-sky-500 bg-emerald-500 bg-yellow-300 bg-purple-600] %> <% submitter_fields_index = @submission.template.fields.group_by { |f| f['submitter_uuid'] } %> <% @submission.template.submitters.each_with_index do |item, index| %> <% submitter = @submission.submitters.find { |e| e.uuid == item['uuid'] } %> @@ -108,7 +108,7 @@ <% elsif field['type'] == 'checkbox' %> - <%= svg_icon('check', class: "w-6 h-6") %> + <%= svg_icon('check', class: 'w-6 h-6') %> <% elsif field['type'] == 'date' %> <%= l(Date.parse(value)) %> <% else %> diff --git a/app/views/submit_form/completed.html.erb b/app/views/submit_form/completed.html.erb index eaacef55..0d84d784 100644 --- a/app/views/submit_form/completed.html.erb +++ b/app/views/submit_form/completed.html.erb @@ -4,7 +4,7 @@
    - <%= render 'shared/logo', width: "50px", height: "50px"%> + <%= render 'shared/logo', width: '50px', height: '50px' %>

    DocuSeal

    @@ -13,7 +13,7 @@
    - + diff --git a/app/views/templates/show.html.erb b/app/views/templates/show.html.erb index 4a9973da..a9ed3a7a 100644 --- a/app/views/templates/show.html.erb +++ b/app/views/templates/show.html.erb @@ -39,7 +39,7 @@ <% end %>
    - <%- if @submissions.any? %> + <% if @submissions.any? %> @@ -87,7 +87,7 @@
    <% end %> -
    + <%= link_to 'View', submission_path(submission), title: 'View', class: 'btn btn-outline btn-xs' %> <%= button_to 'Remove', submission_path(submission), class: 'btn btn-outline btn-error btn-xs', title: 'Delete', method: :delete, data: { turbo_confirm: 'Are you sure?' } %>