Class: SCSSLint::SpaceAfterVariableName
- Includes:
- LinterRegistry
- Defined in:
- lib/scss_lint/linter/space_after_variable_name.rb
Overview
Checks for spaces following the name of a variable and before the colon separating the variables’s name from its value.
Constant Summary
Constants included from Utils
Instance Attribute Summary
Attributes inherited from Linter
Instance Method Summary collapse
Methods included from LinterRegistry
extract_linters_from, included
Methods inherited from Linter
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 |
# File 'lib/scss_lint/linter/space_after_variable_name.rb', line 7 def visit_variable(node) return unless spaces_before_colon?(node) add_lint(node, 'Variable names should be followed immediately by a colon') end |