Skip to content

Commit

Permalink
fix: fixes linting in CI
Browse files Browse the repository at this point in the history
linter no longer tries to lint vendor/bundle

linter now also linted *.js.erb files

linted *.js.erb files

changes lint command suggestion in docs
  • Loading branch information
elasticspoon committed Feb 2, 2024
1 parent 3c5acae commit 281a5f2
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .erb-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
glob: "**/*.{html,text,js}{+*,}.erb"
exclude:
- "**/vendor/**/*"
- "**/node_modules/**/*"
EnableDefaultLinters: true
linters:
AllowedScriptType:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you are so inclined, you can open a draft PR as you continue to work on it.
1. Add a test for your change. If you are adding functionality or fixing a bug, you should add a test!

1. Run linters and fix any linting errors they brings up.
- `rubocop -a`
- `bin/lint`

1. Push to your branch/fork and submit a pull request. Include the issue number (ex. `Resolves #1`) in the PR description. This will ensure the issue gets closed automatically when the pull request gets merged.

Expand Down
4 changes: 2 additions & 2 deletions app/views/account_request_mailer/approval_request.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Here are their details:
* <%= ar.humanize %>: <%= val %>
<% end %>

Create This Organization: <%=new_admin_organization_url(token: @account_request.identity_token) %>
Reject This Organization: <%=for_rejection_admin_account_requests_url(token: @account_request.identity_token) %>
Create This Organization: <%= new_admin_organization_url(token: @account_request.identity_token) %>
Reject This Organization: <%= for_rejection_admin_account_requests_url(token: @account_request.identity_token) %>
2 changes: 1 addition & 1 deletion app/views/barcode_items/create.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ line_item = $('#' + source_field).closest('.nested-fields');
$(line_item).find('input[type=number]').val(quantity);
$(line_item).find('[value="' + item_id + '"]').attr("selected", true);
$('#__add_line_item').trigger('click');
$("input.__barcode_item_lookup").last().focus();
$("input.__barcode_item_lookup").last().focus();
2 changes: 1 addition & 1 deletion app/views/distribution_mailer/reminder_email.text.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% delivery_method = (@distribution.delivery?) ? "delivery" : "pick up"%>
<% delivery_method = (@distribution.delivery?) ? "delivery" : "pick up" %>
Hello <%= @partner.name %>,
This is a friendly reminder that tomorrow, <%= @distribution.issued_at.strftime("%A, %B #{@distribution.issued_at.day.ordinalize} %Y at %I:%M%p") %>, is your distribution <%= delivery_method %> date.

Expand Down
2 changes: 1 addition & 1 deletion app/views/manufacturers/create.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ $("#donation_manufacturer_id").empty();
$("#donation_manufacturer_id").
html('<%= j options_from_collection_for_select(current_organization.manufacturers, :id, :name) %>');
$("#donation_manufacturer_id").append('<option value="">---Create new Manufacturer---</option>');
$("#donation_manufacturer_id").val('<%= @manufacturer[:id] %>');
$("#donation_manufacturer_id").val('<%= @manufacturer[:id] %>');
2 changes: 1 addition & 1 deletion app/views/manufacturers/new_modal.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$("#modal_new").html("<%= j (render "manufacturers/new_modal") %>");
$("#modal_new").modal("show");
$("#modal_new").modal("show");
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
You've received a request to approve the account for <%= @partner.name %>.

Review This Partner: <%=partner_url(organization_id: @organization.short_name, id: @partner.id, anchor: "partner-information") %>
Review This Partner: <%= partner_url(organization_id: @organization.short_name, id: @partner.id, anchor: "partner-information") %>
2 changes: 1 addition & 1 deletion app/views/partner_mailer/application_approved.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Hi <%= @partner.name %>

<%= @organization.name %> has approved your application.

Check out your dashboard: <%=partners_dashboard_url %>
Check out your dashboard: <%= partners_dashboard_url %>
1 change: 0 additions & 1 deletion app/views/partner_mailer/recertification_request.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ If any information has changed, please amend it on the form and then click Updat
If you have any questions please contact <%= @organization.name %> at <%= @organization.email %>

Thank you and have a great day!

2 changes: 1 addition & 1 deletion app/views/partners/children/index.js.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% js = escape_javascript(
render(partial: 'partners/children/list', locals: { children: @children })
) %>
$("#filterrific_results").html("<%= js %>");
$("#filterrific_results").html("<%= js %>");
2 changes: 1 addition & 1 deletion app/views/product_drive_participants/create.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ $("#donation_product_drive_participant_id").empty();
$("#donation_product_drive_participant_id").
html('<%= j options_from_collection_for_select(current_organization.product_drive_participants, :id, :business_name) %>');
$("#donation_product_drive_participant_id").append('<option value="">---Create new Participant---</option>');
$("#donation_product_drive_participant_id").val('<%= @product_drive_participant[:id] %>');
$("#donation_product_drive_participant_id").val('<%= @product_drive_participant[:id] %>');
2 changes: 1 addition & 1 deletion app/views/product_drive_participants/new_modal.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$("#modal_new").html("<%= j (render "product_drive_participants/new_modal") %>");
$("#modal_new").modal("show");
$("#modal_new").modal("show");
2 changes: 1 addition & 1 deletion app/views/product_drives/new_modal.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$("#modal_new").html("<%= j (render "product_drives/new_modal") %>");
$("#modal_new").modal("show");
$("#modal_new").modal("show");
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ This is an email confirmation that the <%= @organization.name %> has received yo
<%= item['name'] %> - <%= item['quantity'] || item['person_count'] %>
<% end %>


You will receive a notification when a distribution has been created of the pick-up time and date.

Your friends at
Expand Down
3 changes: 1 addition & 2 deletions app/views/shared/_table_row_prepend.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ $('#flash-message-container').html('')
$(".index tbody").prepend(
`<%= j render(partial: "#{table_row_prepend.class.to_s.underscore}_row",
object: table_row_prepend,
locals: {class: 'info'})
%>`
locals: {class: 'info'}) %>`
)
<% end %>
2 changes: 1 addition & 1 deletion app/views/vendors/create.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ $("#purchase_vendor_id").empty();
$("#purchase_vendor_id").
html('<%= j options_from_collection_for_select(current_organization.vendors, :id, :business_name) %>');
$("#purchase_vendor_id").append('<option value="">---Not Listed---</option>');
$("#purchase_vendor_id").val('<%= @vendor[:id] %>');
$("#purchase_vendor_id").val('<%= @vendor[:id] %>');

0 comments on commit 281a5f2

Please sign in to comment.