lib/scss_lint/linter/trailing_semicolon.rb in scss-lint-0.30.0 vs lib/scss_lint/linter/trailing_semicolon.rb in scss-lint-0.31.0
- old
+ new
@@ -26,23 +26,25 @@
check_semicolon(node)
end
end
def visit_import(node)
+ # Ignore all but the last import for comma-separated @imports
+ return if source_from_range(node.source_range) =~ /,\s*$/
check_semicolon(node)
end
private
def check_semicolon(node)
if has_space_before_semicolon?(node)
line = node.source_range.start_pos.line
- add_lint line, 'Declaration should be terminated by a semicolon'
- elsif !ends_with_semicolon?(node)
- line = node.source_range.start_pos.line
add_lint line,
'Declaration should not have a space before ' \
'the terminating semicolon'
+ elsif !ends_with_semicolon?(node)
+ line = node.source_range.start_pos.line
+ add_lint line, 'Declaration should be terminated by a semicolon'
elsif ends_with_multiple_semicolons?(node)
line = node.source_range.start_pos.line
add_lint line, 'Declaration should be terminated by a single semicolon'
end
end