lib/scss_lint/linter/border_zero.rb in scss-lint-0.20.3 vs lib/scss_lint/linter/border_zero.rb in scss-lint-0.21.0
- old
+ new
@@ -2,22 +2,23 @@
# Reports when `border: 0` can be used instead of `border: none`.
class Linter::BorderZero < Linter
include LinterRegistry
def visit_prop(node)
- return unless BORDER_PROPERTIES.include? node.name.first.to_s
- add_lint(node) if node.value.to_sass.strip == 'none'
- end
+ return unless BORDER_PROPERTIES.include?(node.name.first.to_s)
- def description
- '`border: 0;` is preferred over `border: none;`'
+ if node.value.to_sass.strip == 'none'
+ add_lint(node, '`border: 0;` is preferred over `border: none;`')
+ end
end
private
- BORDER_PROPERTIES = %w[border
- border-top
- border-right
- border-bottom
- border-left]
+ BORDER_PROPERTIES = %w[
+ border
+ border-top
+ border-right
+ border-bottom
+ border-left
+ ]
end
end