Sha256: 3e0c422a5a075d811961a8f31b35f7912289d46223d8f6148a5964b8debf30e9

Contents?: true

Size: 344 Bytes

Versions: 28

Compression:

Stored size: 344 Bytes

Contents

# frozen_string_literal: true

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

28 entries across 28 versions & 2 rubygems

Version Path
slim_lint-0.20.1 lib/slim_lint/linter/tag_case.rb
slim_lint-0.20.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.19.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.18.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.17.1 lib/slim_lint/linter/tag_case.rb
slim_lint-0.17.0 lib/slim_lint/linter/tag_case.rb
slim_lint-0.16.1 lib/slim_lint/linter/tag_case.rb
slim_lint-0.16.0 lib/slim_lint/linter/tag_case.rb