Skip to content

Commit

Permalink
Add erb-lint with github a11y linters
Browse files Browse the repository at this point in the history
  • Loading branch information
cbliard committed Sep 14, 2023
1 parent 19cb3cb commit 6249480
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .erb-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
EnableDefaultLinters: true
inherit_gem:
erblint-github:
- config/accessibility.yml
exclude:
- '**/frontend/**/*'
- '**/node_modules/**/*'
- '**/vendor/**/*'
linters:
ErbSafety:
enabled: true
Rubocop:
enabled: true
rubocop_config:
inherit_from:
- .rubocop.yml
Layout/InitialIndentation:
Enabled: false
Layout/LeadingEmptyLines:
Enabled: false
Layout/LineLength:
Enabled: false
Layout/TrailingEmptyLines:
Enabled: false
Layout/TrailingWhitespace:
Enabled: false
Naming/FileName:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Lint/UselessAssignment:
Enabled: false
Rails/OutputSafety:
Enabled: false
1 change: 1 addition & 0 deletions .erb-linters/erblint-github.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require "erblint-github/linters"
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ group :development, :test do
gem 'rubocop-rspec', require: false
gem 'rubocop-performance', require: false

# erb linting
gem "erb_lint", require: false
gem "erblint-github", require: false

# Brakeman scanner
gem 'brakeman', '~> 6.0.0'
end
Expand Down
18 changes: 18 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,13 @@ GEM
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.1.1)
bcrypt (3.1.19)
better_html (2.0.2)
actionview (>= 6.0)
activesupport (>= 6.0)
ast (~> 2.0)
erubi (~> 1.4)
parser (>= 2.4)
smart_properties
bindata (2.4.15)
bootsnap (1.16.0)
msgpack (~> 1.2)
Expand Down Expand Up @@ -436,6 +443,14 @@ GEM
activemodel
equivalent-xml (0.6.0)
nokogiri (>= 1.4.3)
erb_lint (0.5.0)
activesupport
better_html (>= 2.0.1)
parser (>= 2.7.1.4)
rainbow
rubocop
smart_properties
erblint-github (0.4.1)
erubi (1.12.0)
escape_utils (1.3.0)
et-orbi (1.2.7)
Expand Down Expand Up @@ -903,6 +918,7 @@ GEM
multi_json (~> 1.10)
simpleidn (0.2.1)
unf (~> 0.1.4)
smart_properties (1.17.0)
spreadsheet (1.3.0)
ruby-ole
spring (4.1.1)
Expand Down Expand Up @@ -1039,6 +1055,8 @@ DEPENDENCIES
dry-container
email_validator (~> 2.2.3)
equivalent-xml (~> 0.6)
erb_lint
erblint-github
escape_utils (~> 1.3)
factory_bot (~> 6.2.0)
factory_bot_rails (~> 6.2.0)
Expand Down

0 comments on commit 6249480

Please sign in to comment.