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

- old
+ new

@@ -44,13 +44,13 @@ skewX skewY translateX translateY translateZ ].to_set def check_name(node, node_type, node_text = node.name) - if convention = violated_convention(node_text) - add_lint(node, "Name of #{node_type} `#{node_text}` should be " \ - "written #{convention[:explanation]}") - end + return unless violation = violated_convention(node_text) + + add_lint(node, "Name of #{node_type} `#{node_text}` should be " \ + "written #{violation[:explanation]}") end def check_placeholder(node) extract_string_selectors(node.selector).any? do |selector_str| check_name(node, 'placeholder', selector_str.gsub('%', ''))