Skip to content

Commit

Permalink
Dont use rubocop for erb (#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron authored Jul 21, 2022
1 parent 7b3d594 commit 047c6be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-insects-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

Don't lint ERB files with Rubocop
4 changes: 0 additions & 4 deletions .erb-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ linters:
rubocop_config:
inherit_from:
- lib/rubocop/config/default.yml
inherit_gem:
rubocop-github:
- config/default_edge.yml
- config/rails_edge.yml
Primer/DeprecatedComponents:
Enabled: true
Exclude:
Expand Down
28 changes: 2 additions & 26 deletions lib/rubocop/config/default.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
require:
- rubocop/cop/primer
- rubocop-rails

####### RUBOCOP'S DEFAULTS #######
# we don't want these in .erb files
Style/FrozenStringLiteralComment:
Enabled: false

# lots of false-positives in .erb files
Layout/InitialIndentation:
Enabled: false

Style/StringLiterals:
EnforcedStyle: double_quotes

# lots of false-positives - this cop is meant for Ruby code, not .erb
Layout/TrailingEmptyLines:
Enabled: false

# it's often not desirable to add unnecessary newlines into .erb files, as
# they will appear in the rendered HTML
Layout/LineLength:
Enabled: false

# calling .html_safe in templates is ok
Rails/OutputSafety:
Enabled: false
AllCops:
DisabledByDefault: true

####### PRIMER COPS #######
Primer/SystemArgumentInsteadOfClass:
Enabled: true

Expand Down

0 comments on commit 047c6be

Please sign in to comment.