blob: eef95cd95ef373d24ea555b2867a11495062085c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
require 'haml_lint/haml_visitor'
require 'haml_lint/linter'
require 'haml_lint/linter_registry'
module HamlLint
class Linter::InlineJavaScript < Linter
include LinterRegistry
def visit_filter(node)
return unless node.filter_type == 'javascript'
record_lint(node, 'Inline JavaScript is discouraged. If needed, you can add this file to the list of exceptions in .haml-lint.yml.')
end
end
end
|