lib/scss_lint/linter/declaration_order.rb in scss-lint-0.20.3 vs lib/scss_lint/linter/declaration_order.rb in scss-lint-0.21.0
- old
+ new
@@ -16,21 +16,20 @@
sorted_children = children.sort do |a, b|
DECLARATION_ORDER.index(a) <=> DECLARATION_ORDER.index(b)
end
if children != sorted_children
- add_lint(node.children.first)
+ add_lint(node.children.first, MESSAGE)
end
yield # Continue linting children
end
- def description
+ private
+
+ MESSAGE =
'Rule sets should start with @extend declarations, followed by ' <<
'properties and nested rule sets, in that order'
- end
-
- private
def important_node?(node)
DECLARATION_ORDER.include? node.class
end
end