Add rubocop and erb-lints rules for output safetey
This way we make sure we won't add `html_safe` or `raw` calls in the future. I'm excluding `text_with_links_helpers` for this check, because in this situation the use of `html_safe` is justified: we check the original input is safe, and we're only adding link tags to raw URLs.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
---
|
||||
linters:
|
||||
ErbSafety:
|
||||
enabled: true
|
||||
ExtraNewline:
|
||||
enabled: true
|
||||
FinalNewline:
|
||||
|
||||
@@ -160,6 +160,12 @@ Rails/Date:
|
||||
Rails/HttpPositionalArguments:
|
||||
Enabled: true
|
||||
|
||||
Rails/OutputSafety:
|
||||
Enabled: true
|
||||
Severity: warning
|
||||
Exclude:
|
||||
- app/helpers/text_with_links_helper.rb
|
||||
|
||||
Rails/PluralizationGrammar:
|
||||
Enabled: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user