Sha256: 254870b18eed0efeabb9c056ba292b11fc78e3e91c57d9ad48e55ea96e9cfafa
Contents?: true
Size: 480 Bytes
Versions: 4
Compression:
Stored size: 480 Bytes
Contents
# frozen_string_literal: true module SlimLint # Checks for forbidden tag attributes. class Linter::TagAttribute < Linter include LinterRegistry on [:html, :attr] do |sexp| _, _, name = sexp forbidden_attributes = config['forbidden_attributes'] forbidden_attributes.each do |forbidden_attribute| next unless name[/^#{forbidden_attribute}$/i] report_lint(sexp, "Forbidden tag attribute `#{name}` found") end end end end
Version data entries
4 entries across 4 versions & 1 rubygems