diff --git a/.erb-lint.yml b/.erb_lint.yml similarity index 100% rename from .erb-lint.yml rename to .erb_lint.yml diff --git a/Gemfile b/Gemfile index 1030f0c677c..ee19f1969e6 100644 --- a/Gemfile +++ b/Gemfile @@ -105,7 +105,7 @@ group :development, :test do gem 'brakeman', require: false gem 'bullet', '~> 7.0' gem 'capybara-webmock', git: 'https://github.com/hashrocket/capybara-webmock.git', ref: 'd3f3b7c' - gem 'erb_lint', '~> 0.5.0', require: false + gem 'erb_lint', '~> 0.7.0', require: false gem 'i18n-tasks', '~> 1.0' gem 'knapsack' gem 'listen' diff --git a/Gemfile.lock b/Gemfile.lock index dda8909ff93..037d8d04e17 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -305,12 +305,12 @@ GEM htmlentities (~> 4.3.3) launchy (~> 2.1) mail (~> 2.7) - erb_lint (0.5.0) + erb_lint (0.7.0) activesupport better_html (>= 2.0.1) parser (>= 2.7.1.4) rainbow - rubocop + rubocop (>= 1) smart_properties errbase (0.2.1) erubi (1.13.0) @@ -779,7 +779,7 @@ DEPENDENCIES devise (~> 4.8) dotiw (>= 4.0.1) email_spec - erb_lint (~> 0.5.0) + erb_lint (~> 0.7.0) factory_bot_rails (>= 6.2.0) faker faraday (~> 2) diff --git a/Makefile b/Makefile index f10d272378a..482082e652d 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ check: lint test ## Runs lint tests and spec tests lint: ## Runs all lint tests # Ruby - @echo "--- erb-lint ---" + @echo "--- erb_lint ---" make lint_erb @echo "--- rubocop ---" mkdir -p tmp @@ -112,7 +112,7 @@ audit: ## Checks packages for vulnerabilities yarn audit --groups dependencies; test $$? -le 7 lint_erb: ## Lints ERB files - bundle exec erblint app/views app/components + bundle exec erb_lint app/views app/components lint_yaml: normalize_yaml ## Lints YAML files (! git diff --name-only | grep "^config/.*\.yml") || (echo "Error: Run 'make normalize_yaml' to normalize YAML"; exit 1) @@ -181,8 +181,8 @@ lint_spec_file_name: lintfix: ## Try to automatically fix any Ruby, ERB, JavaScript, YAML, or CSS lint errors @echo "--- rubocop fix ---" bundle exec rubocop -a - @echo "--- erblint fix ---" - bundle exec erblint app/views app/components -a + @echo "--- erb_lint fix ---" + bundle exec erb_lint app/views app/components -a @echo "--- eslint fix ---" yarn lint --fix @echo "--- stylelint fix ---" diff --git a/spec/support/deprecated_classes.rb b/spec/support/deprecated_classes.rb index 333b672b558..16e595e48e1 100644 --- a/spec/support/deprecated_classes.rb +++ b/spec/support/deprecated_classes.rb @@ -1,7 +1,7 @@ class ActionView::Helpers::TagHelper::TagBuilder def self.deprecated_classes @deprecated_classes ||= begin - YAML.safe_load(File.read(File.expand_path('../../../.erb-lint.yml', __FILE__))). + YAML.safe_load(File.read(File.expand_path('../../../.erb_lint.yml', __FILE__))). dig('linters', 'DeprecatedClasses', 'rule_set'). flat_map { |rule| rule['deprecated'] }. map { |regex_str| Regexp.new "^#{regex_str}$" }