Skip to content

Autocorrect with rubocop #383

Open
Open
@jcoyne

Description

When my config is:

---
EnableDefaultLinters: true
linters:
  ErbSafety:
    enabled: true
  Rubocop:
    enabled: true

and I run erb_lint -a it does this correction.

+++ b/app/views/blacklight/nav/_search_history.html.erb
@@ -1 +1,3 @@
-<%= link_to t('blacklight.header_links.search_history'), blacklight.search_history_path, class: 'nav-link' %>
+# frozen_string_literal: true
+link_to t('blacklight.header_links.search_history'), blacklight.search_history_path, class: 'nav-link'
+ %>

This drops the opening <%= tag.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions