Commit 9d06504d authored by Winnie Hellmann's avatar Winnie Hellmann

Forbid all inline script tags in Linter::InlineJavaScript

parent 891d1302
......@@ -8,7 +8,7 @@ unless Rails.env.production?
include LinterRegistry
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)')
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