Sha256: b539f2e233457f13f50e8a69d16113bf81a1090f859e01ec3057f555456491dd
Contents?: true
Size: 442 Bytes
Versions: 1
Compression:
Stored size: 442 Bytes
Contents
module SCSSLint class Linter::TypeInIdSelector < Linter include LinterRegistry def visit_rule(node) selectors = node.rule.first.to_s.split(',') selectors.each do |selector| add_lint(node) if selector.strip =~ /^[a-z0-9]+#.*/i end yield # Continue linting children end def description 'Avoid ID names with unnecessary type selectors (e.g. prefer `#id` over `p#id`)' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scss-lint-0.9.0 | lib/scss_lint/linter/type_in_id_selector.rb |