Class: SCSSLint::Linter::StringQuotes
Overview
Checks the type of quotes used in string literals.
Constant Summary
Constants included
from Utils
Utils::COLOR_REGEX
Instance Attribute Summary
#config, #engine, #lints
Instance Method Summary
collapse
extract_linters_from, included
#initialize, #name, #run
Methods included from Utils
#color?, #color_hex?, #color_keyword?, #color_keyword_to_code, #extract_string_selectors, #node_siblings, #pluralize, #previous_node, #remove_quoted_strings, #same_position?
#visit_selector
Instance Method Details
#visit_charset(node) ⇒ Object
35
36
37
38
39
40
|
# File 'lib/scss_lint/linter/string_quotes.rb', line 35
def visit_charset(node)
source = source_from_range(node.source_range)[('@charset'.length)..-1]
check_quotes(node, source)
end
|
6
7
8
9
10
11
12
13
|
# File 'lib/scss_lint/linter/string_quotes.rb', line 6
def (_node)
end
|
#visit_import(node) ⇒ Object
30
31
32
33
|
# File 'lib/scss_lint/linter/string_quotes.rb', line 30
def visit_import(node)
check_quotes(node, source_from_range(node.source_range))
end
|
#visit_script_string(node) ⇒ Object
26
27
28
|
# File 'lib/scss_lint/linter/string_quotes.rb', line 26
def visit_script_string(node)
check_quotes(node, source_from_range(node.source_range))
end
|
#visit_script_stringinterpolation(node) ⇒ Object
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/scss_lint/linter/string_quotes.rb', line 15
def visit_script_stringinterpolation(node)
node.children.reject { |child| child.is_a?(Sass::Script::Tree::Literal) }
.each { |child| visit(child) }
end
|