Sha256: d717557829011f3acccff17f11be4e9992fe791361ec99af656b76d50b18ba65
Contents?: true
Size: 561 Bytes
Versions: 4
Compression:
Stored size: 561 Bytes
Contents
module SCSSLint # Checks that `@extend` is always used with a placeholder selector. class Linter::PlaceholderInExtend < Linter include LinterRegistry def visit_extend(node) # The array returned by the parser is a bit awkward in that it splits on # every word boundary (so %placeholder becomes ['%', 'placeholder']). selector = node.selector.join unless selector.start_with?('%') add_lint(node, 'Prefer using placeholder selectors (e.g. %some-placeholder) with @extend') end end end end
Version data entries
4 entries across 4 versions & 1 rubygems