Skip to content

Commit

Permalink
Add workflow for erb-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
syed-ali-tw committed Aug 19, 2024
1 parent f4725a9 commit 02ac290
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
name: Lint Ruby
uses: alphagov/govuk-infrastructure/.github/workflows/rubocop.yml@main

lint-erb:
name: Lint Ruby
uses: alphagov/govuk-infrastructure/.github/workflows/erblint.yml@main

test-javascript:
name: Test JavaScript
uses: alphagov/govuk-infrastructure/.github/workflows/jasmine.yml@main
Expand Down
4 changes: 2 additions & 2 deletions app/views/homepage/popular_links/_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
primary_link_button_for(edit_popular_links_path(@latest_popular_links), "Edit popular links") ,
secondary_button_for(@latest_popular_links, publish_popular_links_path(@latest_popular_links), "Publish"),
link_to("Preview (opens in new tab)", preview_homepage_path(@latest_popular_links), rel:"noreferrer noopener", target:"_blank", class: "govuk-link"),
link_to("Delete draft", confirm_destroy_popular_links_path(@latest_popular_links), class: "govuk-link gem-link--destructive")
]
link_to("Delete draft", confirm_destroy_popular_links_path(@latest_popular_links), class: "govuk-link gem-link--destructive"),
],
} %>
<% end %>
</div>
6 changes: 1 addition & 5 deletions lib/tasks/lint.rake
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
desc "Run all linters"
task lint: :environment do
if Rails.env.development?
sh "bundle exec erblint --lint-all --autocorrect"
else
sh "bundle exec erblint --lint-all"
end
sh "bundle exec erblint --lint-all"
sh "bundle exec rubocop"
sh "yarn run lint"
end

0 comments on commit 02ac290

Please sign in to comment.