Class: SCSSLint::Linter::EmptyLineBetweenBlocks
Overview
Reports the lack of empty lines between block defintions.
Constant Summary
Constants included
from Utils
Utils::COLOR_REGEX
Instance Attribute Summary
#config, #engine, #lints
Instance Method Summary
collapse
extract_linters_from, included
inherited, #initialize, #name, #run
Methods included from Utils
#color?, #color_hex?, #color_keyword?, #color_keyword_to_code, #else_node?, #extract_string_selectors, #node_ancestor, #node_siblings, #pluralize, #previous_node, #remove_quoted_strings, #same_position?
#visit_selector
Instance Method Details
#visit_atroot(node) ⇒ Object
6
7
8
9
|
# File 'lib/scss_lint/linter/empty_line_between_blocks.rb', line 6
def visit_atroot(node)
check(node, '@at-root')
yield
end
|
#visit_function(node) ⇒ Object
11
12
13
14
|
# File 'lib/scss_lint/linter/empty_line_between_blocks.rb', line 11
def visit_function(node)
check(node, '@function')
yield
end
|
16
17
18
19
|
# File 'lib/scss_lint/linter/empty_line_between_blocks.rb', line 16
def visit_media(node)
check(node, '@media')
yield
end
|
#visit_mixin(node) ⇒ Object
21
22
23
24
25
26
|
# File 'lib/scss_lint/linter/empty_line_between_blocks.rb', line 21
def visit_mixin(node)
check(node, '@include') if node.children
.any? { |child| child.is_a?(Sass::Tree::Node) }
yield
end
|
#visit_mixindef(node) ⇒ Object
28
29
30
31
|
# File 'lib/scss_lint/linter/empty_line_between_blocks.rb', line 28
def visit_mixindef(node)
check(node, '@mixin')
yield
end
|
#visit_rule(node) ⇒ Object
33
34
35
36
|
# File 'lib/scss_lint/linter/empty_line_between_blocks.rb', line 33
def visit_rule(node)
check(node, 'Rule')
yield
end
|