Sha256: 5580156f22149bf81a5c5acfc4d5265dc4238115484576b065ba24994a374fa0

Contents?: true

Size: 310 Bytes

Versions: 40

Compression:

Stored size: 310 Bytes

Contents

module SCSSLint
  # Reports the use of !important in properties.
  class Linter::ImportantRule < Linter
    include LinterRegistry

    def visit_prop(node)
      return unless source_from_range(node.source_range).include?('!important')

      add_lint(node, '!important should not be used')
    end
  end
end

Version data entries

40 entries across 40 versions & 3 rubygems

Version Path
scss_lint-0.45.0 lib/scss_lint/linter/important_rule.rb
scss_lint-0.44.0 lib/scss_lint/linter/important_rule.rb
scss_lint-0.43.2 lib/scss_lint/linter/important_rule.rb
scss_lint-0.43.1 lib/scss_lint/linter/important_rule.rb
scss_lint-0.43.0 lib/scss_lint/linter/important_rule.rb
scss_lint-0.42.2 lib/scss_lint/linter/important_rule.rb
scss_lint-0.42.1 lib/scss_lint/linter/important_rule.rb
scss_lint-0.42.0 lib/scss_lint/linter/important_rule.rb
scss_lint-0.41.0 lib/scss_lint/linter/important_rule.rb
scss_lint-0.40.1 lib/scss_lint/linter/important_rule.rb
scss_lint-0.40.0 lib/scss_lint/linter/important_rule.rb
scss_lint-0.39.0 lib/scss_lint/linter/important_rule.rb
scss_lint-0.38.0 lib/scss_lint/linter/important_rule.rb
scss-lint-0.38.0 lib/scss_lint/linter/important_rule.rb
scss-lint-bliss-1.0.0 lib/scss_lint/linter/important_rule.rb
scss-lint-0.37.0 lib/scss_lint/linter/important_rule.rb
scss-lint-0.36.1 lib/scss_lint/linter/important_rule.rb
scss-lint-0.36.0 lib/scss_lint/linter/important_rule.rb
scss-lint-0.35.0 lib/scss_lint/linter/important_rule.rb
scss-lint-0.34.0 lib/scss_lint/linter/important_rule.rb