Class: SCSSLint::Linter::DeclaredName
- Inherits:
-
SCSSLint::Linter
- Object
- Sass::Tree::Visitors::Base
- SCSSLint::Linter
- SCSSLint::Linter::DeclaredName
- Includes:
- SCSSLint::LinterRegistry
- Defined in:
- lib/scss_lint/linter/declared_name.rb
Overview
Checks that the declared names of functions, mixins, and variables are all lowercase and use hyphens instead of underscores.
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
#add_lint, #character_at, #description, #initialize, node_name, #run, #visit, #visit_children
Methods included from Utils
#can_be_condensed?, #extract_string_selectors, #node_has_bad_name?, #pluralize, #previous_node, #remove_quoted_strings, #shortest_hex_form
Methods included from SelectorVisitor
Constructor Details
This class inherits a constructor from SCSSLint::Linter
Instance Method Details
#visit_function(node) ⇒ Object
7 8 9 10 |
# File 'lib/scss_lint/linter/declared_name.rb', line 7 def visit_function(node) check(node, 'function') yield # Continue into content block of this function definition end |
#visit_mixindef(node) ⇒ Object
12 13 14 15 |
# File 'lib/scss_lint/linter/declared_name.rb', line 12 def visit_mixindef(node) check(node, 'mixin') yield # Continue into content block of this mixin definition end |
#visit_variable(node) ⇒ Object
17 18 19 20 |
# File 'lib/scss_lint/linter/declared_name.rb', line 17 def visit_variable(node) check(node, 'variable') yield # Continue into expression tree for this variable definition end |