Sha256: e6e4eb095a04e01a419fc8aed9a381f4fb4c1c368db07710f65f496ef56794b7

Contents?: true

Size: 350 Bytes

Versions: 1

Compression:

Stored size: 350 Bytes

Contents

module SCSSLint
  class Linter::ZeroUnit < Linter
    include LinterRegistry

    def visit_prop(node)
      line = engine.lines[node.line - 1] if node.line
      add_lint(node) if line =~ /^\s*[\w-]+:\s*0[a-z]+;$/i
    end

    def description
      'Properties with a value of zero should be unit-less, e.g. "0" instead of "0px"'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scss-lint-0.9.0 lib/scss_lint/linter/zero_unit.rb