Update inline_javascript.rb

This commit is contained in:
Winnie Hellmann 2018-02-28 21:42:34 +00:00
parent 9d06504d42
commit 83b3e9fa40

View file

@ -6,8 +6,8 @@ unless Rails.env.production?
module HamlLint
class Linter::InlineJavaScript < Linter
include LinterRegistry
def visit_filter(node)
def visit_tag(node)
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)')