Class: SCSSLint::Linter::SpaceAfterVariableColon
- Inherits:
-
SCSSLint::Linter
- Object
- Sass::Tree::Visitors::Base
- SCSSLint::Linter
- SCSSLint::Linter::SpaceAfterVariableColon
- Includes:
- SCSSLint::LinterRegistry
- Defined in:
- lib/scss_lint/linter/space_after_variable_colon.rb
Overview
Checks for spaces following the colon that separates a variable’s name from its value.
Constant Summary
Constants included from Utils
Instance Attribute Summary
Attributes inherited from SCSSLint::Linter
Instance Method Summary collapse
Methods included from SCSSLint::LinterRegistry
extract_linters_from, included
Methods inherited from SCSSLint::Linter
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?
Methods included from SelectorVisitor
Constructor Details
This class inherits a constructor from SCSSLint::Linter
Instance Method Details
#visit_variable(node) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/scss_lint/linter/space_after_variable_colon.rb', line 7 def visit_variable(node) whitespace = whitespace_after_colon(node) case config['style'] when 'no_space' check_for_no_spaces(node, whitespace) when 'one_space' check_for_one_space(node, whitespace) when 'at_least_one_space' check_for_at_least_one_space(node, whitespace) when 'one_space_or_newline' check_for_one_space_or_newline(node, whitespace) end end |