lib/scss_lint/linter/property_spelling.rb in scss-lint-0.23.1 vs lib/scss_lint/linter/property_spelling.rb in scss-lint-0.24.0

- old
+ new

@@ -1,11 +1,11 @@ module SCSSLint # Checks for misspelled properties. class Linter::PropertySpelling < Linter include LinterRegistry - def visit_root(node) + def visit_root(_node) @extra_properties = config['extra_properties'].to_set yield # Continue linting children end def visit_prop(node) @@ -14,13 +14,13 @@ name = node.name.join # Ignore vendor-prefixed properties return if name.start_with?('-') + return if KNOWN_PROPERTIES.include?(name) || + @extra_properties.include?(name) - unless KNOWN_PROPERTIES.include?(name) || @extra_properties.include?(name) - add_lint(node, "Unknown property #{name}") - end + add_lint(node, "Unknown property #{name}") end private KNOWN_PROPERTIES = File.open(File.join(SCSS_LINT_DATA, 'properties.txt'))