Sha256: 71b0b8753e83f5b67ea8749a5b6de2d14a3f7393c714c559867ed8224f88851a

Contents?: true

Size: 780 Bytes

Versions: 137

Compression:

Stored size: 780 Bytes

Contents

# frozen_string_literal: true

require_relative "base_linter"
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 < BaseLinter
      include Autocorrectable

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

Version data entries

137 entries across 137 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.49.2 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
primer_view_components-0.35.2 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.49.1 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.49.0 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
primer_view_components-0.35.1 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
primer_view_components-0.35.0 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.48.2 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.48.1 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.48.0 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.47.1 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.47.0 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
primer_view_components-0.34.0 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.46.1 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.46.0 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.45.0 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.44.3 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.44.2 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.44.1 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
primer_view_components-0.33.0 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
openproject-primer_view_components-0.44.0 lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb