summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gay <eapoems@riseup.net>2023-10-29 23:32:50 -0400
committerDavid Gay <eapoems@riseup.net>2023-10-29 23:32:50 -0400
commit1088c36ffb0c9b215492fc9c5a8c61a251ef97b2 (patch)
tree79180fe642f70e449bd67140ac2abf2e0531e0e9
parentc1b1899c30e626324deebb4f1afbb2d6546db6f3 (diff)
Install and configure erb-lint
-rw-r--r--.erb-lint.yml22
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock16
3 files changed, 39 insertions, 0 deletions
diff --git a/.erb-lint.yml b/.erb-lint.yml
new file mode 100644
index 0000000..20c9008
--- /dev/null
+++ b/.erb-lint.yml
@@ -0,0 +1,22 @@
+---
+EnableDefaultLinters: true
+linters:
+ Rubocop:
+ enabled: true
+ rubocop_config:
+ inherit_from:
+ - .rubocop.yml
+ Layout/InitialIndentation:
+ Enabled: false
+ Layout/TrailingEmptyLines:
+ Enabled: false
+ Layout/TrailingWhitespace:
+ Enabled: false
+ Layout/LeadingEmptyLines:
+ Enabled: false
+ # False flags for view files.
+ # ViewComponents should never see this, though, as they should never need to assign in a view.
+ Lint/UselessAssignment:
+ Exclude:
+ - "app/jobs/**/*"
+ - "app/views/**/*"
diff --git a/Gemfile b/Gemfile
index 1aec2b6..83760a0 100644
--- a/Gemfile
+++ b/Gemfile
@@ -16,6 +16,7 @@ group :development, :test do
gem "debug"
end
group :development do
+ gem "erb_lint", require: false
gem "rubocop", require: false
gem "rubocop-minitest", require: false
gem "rubocop-packaging", require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index f17a02d..1ad89c4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -78,6 +78,13 @@ GEM
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.1.1)
+ better_html (2.0.2)
+ actionview (>= 6.0)
+ activesupport (>= 6.0)
+ ast (~> 2.0)
+ erubi (~> 1.4)
+ parser (>= 2.4)
+ smart_properties
bigdecimal (3.1.4)
bindex (0.8.1)
bootsnap (1.16.0)
@@ -101,6 +108,13 @@ GEM
reline (>= 0.3.1)
drb (2.1.1)
ruby2_keywords
+ erb_lint (0.5.0)
+ activesupport
+ better_html (>= 2.0.1)
+ parser (>= 2.7.1.4)
+ rainbow
+ rubocop
+ smart_properties
erubi (1.12.0)
globalid (1.2.1)
activesupport (>= 6.1)
@@ -234,6 +248,7 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
+ smart_properties (1.17.0)
stimulus-rails (1.3.0)
railties (>= 6.0.0)
stringio (3.0.8)
@@ -269,6 +284,7 @@ DEPENDENCIES
bootsnap
capybara
debug
+ erb_lint
importmap-rails
pg
propshaft