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:
|
linters:
|
||||||
|
ErbSafety:
|
||||||
|
enabled: true
|
||||||
ExtraNewline:
|
ExtraNewline:
|
||||||
enabled: true
|
enabled: true
|
||||||
FinalNewline:
|
FinalNewline:
|
||||||
|
|||||||
@@ -160,6 +160,12 @@ Rails/Date:
|
|||||||
Rails/HttpPositionalArguments:
|
Rails/HttpPositionalArguments:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Rails/OutputSafety:
|
||||||
|
Enabled: true
|
||||||
|
Severity: warning
|
||||||
|
Exclude:
|
||||||
|
- app/helpers/text_with_links_helper.rb
|
||||||
|
|
||||||
Rails/PluralizationGrammar:
|
Rails/PluralizationGrammar:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user