Class: HamlLint::Linter::InlineStyles

Inherits:
Linter
  • Object
show all
Includes:
HamlLint::LinterRegistry
Defined in:
lib/haml_lint/linter/inline_styles.rb

Overview

Detects use of inline style attributes on any tag

Constant Summary collapse

MESSAGE =
'Do not use inline style attributes'

Instance Method Summary collapse

Methods included from HamlLint::LinterRegistry

extract_linters_from, included

Instance Method Details

#visit_tag(node) ⇒ Object



10
11
12
13
14
# File 'lib/haml_lint/linter/inline_styles.rb', line 10

def visit_tag(node)
  if node.has_hash_attribute?(:style)
    record_lint(node, MESSAGE)
  end
end