Class: ERBLint::Linters::ClipboardCopyComponentMigrationCounter
- Inherits:
-
BaseLinter
- Object
- Linter
- BaseLinter
- ERBLint::Linters::ClipboardCopyComponentMigrationCounter
- Includes:
- Autocorrectable
- Defined in:
- lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb
Overview
Counts the number of times a HTML clipboard-copy is used instead of the component.
Constant Summary collapse
- 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"
Constants inherited from BaseLinter
BaseLinter::CLASSES, BaseLinter::DISALLOWED_CLASSES, BaseLinter::DUMP_FILE
Constants included from TagTreeHelpers
TagTreeHelpers::SELF_CLOSING_TAGS
Method Summary
Methods included from Autocorrectable
#correction, #map_arguments, #message
Methods inherited from BaseLinter
Methods included from Helpers::RuleHelpers
#erb_nodes, #extract_ruby_from_erb_node, #generate_node_offense, #generate_offense, #tags