diff --git a/.erb-lint.yml b/.erb-lint.yml new file mode 100644 index 000000000..2d88a7447 --- /dev/null +++ b/.erb-lint.yml @@ -0,0 +1,24 @@ +--- +EnableDefaultLinters: true +linters: + Rubocop: + enabled: true + rubocop_config: + inherit_from: + - .rubocop.yml + Layout/ArgumentAlignment: + Enabled: false + Layout/CommentIndentation: + Enabled: false + Layout/FirstArgumentIndentation: + Enabled: false + Layout/FirstArrayElementIndentation: + Enabled: false + Layout/FirstHashElementIndentation: + Enabled: false + Layout/InitialIndentation: + Enabled: false + Layout/TrailingEmptyLines: + Enabled: false + Lint/UselessAssignment: + Enabled: false diff --git a/Gemfile b/Gemfile index 09562e673..9fc19e4d0 100644 --- a/Gemfile +++ b/Gemfile @@ -78,6 +78,7 @@ group :development do gem "web-console", ">= 4.1.0" # Display performance information such as SQL time and flame graphs for each request in your browser. # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md + gem "erb_lint", require: false gem "rack-mini-profiler", "~> 2.0" gem "rubocop-govuk", require: false gem "rubocop-performance", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 62d70821c..00b5c74e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -121,6 +121,14 @@ GEM aws-sigv4 (1.4.0) aws-eventstream (~> 1, >= 1.0.2) bcrypt (3.1.17) + better_html (1.0.16) + actionview (>= 4.0) + activesupport (>= 4.0) + ast (~> 2.0) + erubi (~> 1.4) + html_tokenizer (~> 0.0.6) + parser (>= 2.4) + smart_properties bindex (0.8.1) bootsnap (1.11.1) msgpack (~> 1.2) @@ -159,6 +167,14 @@ GEM dotenv (= 2.7.6) railties (>= 3.2) encryptor (3.0.0) + erb_lint (0.1.1) + activesupport + better_html (~> 1.0.7) + html_tokenizer + parser (>= 2.7.1.4) + rainbow + rubocop + smart_properties erubi (1.10.0) excon (0.92.2) factory_bot (6.2.1) @@ -188,6 +204,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) hashdiff (1.0.1) + html_tokenizer (0.0.7) i18n (1.10.0) concurrent-ruby (~> 1.0) inherited_resources (1.13.1) @@ -420,6 +437,7 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + smart_properties (1.17.0) stimulus-rails (1.0.4) railties (>= 6.0.0) strscan (3.0.1) @@ -469,6 +487,7 @@ DEPENDENCIES chartkick devise! dotenv-rails + erb_lint factory_bot_rails govuk-components govuk_design_system_formbuilder