Commit efcd4792 authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Connor Shea

Forbid all inline script tags in Linter::InlineJavaScript

parent c4bdfa92
...@@ -8,7 +8,7 @@ unless Rails.env.production? ...@@ -8,7 +8,7 @@ unless Rails.env.production?
include LinterRegistry include LinterRegistry
def visit_filter(node) def visit_filter(node)
return unless node.filter_type == 'javascript' return unless node.tag_name == 'script'
record_lint(node, 'Inline JavaScript is discouraged (https://docs.gitlab.com/ee/development/gotchas.html#do-not-use-inline-javascript-in-views)') record_lint(node, 'Inline JavaScript is discouraged (https://docs.gitlab.com/ee/development/gotchas.html#do-not-use-inline-javascript-in-views)')
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment