Sha256: 3827c4495b0593a1fc0d315aacfa30d5f463f442be09683e4c15c7ac31e4bafb

Contents?: true

Size: 313 Bytes

Versions: 20

Compression:

Stored size: 313 Bytes

Contents

module SlimLint
  # Searches for tags with uppercase characters.
  class Linter::TagCase < Linter
    include LinterRegistry

    on [:html, :tag] do |sexp|
      _, _, name = sexp
      next unless name[/[A-Z]/]

      report_lint(sexp, "Tag `#{name}` should be written as `#{name.downcase}`")
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
slim_lint-0.15.1 lib/slim_lint/linter/tag_case.rb
slim_lint-0.15.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.14.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.13.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.12.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.11.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.10.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.9.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.8.3 lib/slim_lint/linter/tag_case.rb
slim_lint-0.8.2 lib/slim_lint/linter/tag_case.rb
slim_lint-0.8.1 lib/slim_lint/linter/tag_case.rb
slim_lint-0.8.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.7.2 lib/slim_lint/linter/tag_case.rb
slim_lint-0.7.1 lib/slim_lint/linter/tag_case.rb
slim_lint-0.7.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.6.1 lib/slim_lint/linter/tag_case.rb
slim_lint-0.6.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.5.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.4.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.3.0 lib/slim_lint/linter/tag_case.rb