summaryrefslogtreecommitdiff
path: root/lib/haml_lint
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-02-28 21:23:58 +0000
committerWinnie Hellmann <winnie@gitlab.com>2018-02-28 21:23:58 +0000
commit9d06504d4277ecf53e6f19014d060c6e7009dc0d (patch)
treee30f1f0dcacb351722daedd7bfbebe457267d7e5 /lib/haml_lint
parent891d13022deeebe5f44a2e0387f27a32c8e878e5 (diff)
downloadgitlab-ce-9d06504d4277ecf53e6f19014d060c6e7009dc0d.tar.gz
Forbid all inline script tags in Linter::InlineJavaScript
Diffstat (limited to 'lib/haml_lint')
-rw-r--r--lib/haml_lint/inline_javascript.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/haml_lint/inline_javascript.rb b/lib/haml_lint/inline_javascript.rb
index f5485eb89fa..872502bc8e3 100644
--- a/lib/haml_lint/inline_javascript.rb
+++ b/lib/haml_lint/inline_javascript.rb
@@ -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