Class: SCSSLint::Linter::CapitalizationInSelector

Inherits:
SCSSLint::Linter
  • Object
show all
Includes:
SCSSLint::LinterRegistry
Defined in:
lib/scss_lint/linter/capitalization_in_selector.rb

Overview

Checks for capitalized letters in IDs, classes, types, etc. in selectors.

Instance Attribute Summary

Attributes inherited from SCSSLint::Linter

#config, #engine, #lints

Instance Method Summary collapse

Methods included from SCSSLint::LinterRegistry

extract_linters_from, included

Methods inherited from SCSSLint::Linter

#add_lint, #character_at, #initialize, #node_on_single_line, #run, #source_from_range, #visit, #visit_children

Methods included from Utils

#can_be_condensed?, #extract_string_selectors, #pluralize, #previous_node, #remove_quoted_strings, #shortest_hex_form

Methods included from SelectorVisitor

#visit_selector

Constructor Details

This class inherits a constructor from SCSSLint::Linter

Instance Method Details

#visit_attribute(attribute) ⇒ Object


6
7
8
# File 'lib/scss_lint/linter/capitalization_in_selector.rb', line 6

def visit_attribute(attribute)
  check(attribute)
end

#visit_class(klass) ⇒ Object


10
11
12
# File 'lib/scss_lint/linter/capitalization_in_selector.rb', line 10

def visit_class(klass)
  check(klass)
end

#visit_element(element) ⇒ Object


14
15
16
# File 'lib/scss_lint/linter/capitalization_in_selector.rb', line 14

def visit_element(element)
  check(element)
end

#visit_id(id) ⇒ Object


18
19
20
# File 'lib/scss_lint/linter/capitalization_in_selector.rb', line 18

def visit_id(id)
  check(id)
end

#visit_placeholder(placeholder) ⇒ Object


22
23
24
# File 'lib/scss_lint/linter/capitalization_in_selector.rb', line 22

def visit_placeholder(placeholder)
  check(placeholder)
end

#visit_pseudo(pseudo) ⇒ Object


26
27
28
# File 'lib/scss_lint/linter/capitalization_in_selector.rb', line 26

def visit_pseudo(pseudo)
  check(pseudo, 'Pseudo-selector')
end