Sha256: 6f9cfea22daeb212719faaf2aa63152671551145f8fd0cd77dcab35f2f077274

Contents?: true

Size: 748 Bytes

Versions: 3

Compression:

Stored size: 748 Bytes

Contents

# frozen_string_literal: true

require_relative "helpers"
require_relative "autocorrectable"
require_relative "argument_mappers/clipboard_copy"

module ERBLint
  module Linters
    # Counts the number of times a HTML clipboard-copy is used instead of the component.
    class ClipboardCopyComponentMigrationCounter < Linter
      include Helpers
      include Autocorrectable

      TAGS = %w[clipboard-copy].freeze
      CLASSES = %w[].freeze
      MESSAGE = "We are migrating clipboard-copy to use [Primer::ClipboardCopy](https://primer.style/view-components/components/clipboardcopy), please try to use that instead of raw HTML."
      ARGUMENT_MAPPER = ArgumentMappers::ClipboardCopy
      COMPONENT = "Primer::ClipboardCopy"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
primer_view_components-0.0.51 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
primer_view_components-0.0.50 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
primer_view_components-0.0.49 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb