Class: ERBLint::Linters::ClipboardCopyComponentMigrationCounter

Inherits:
BaseLinter
  • Object
show all
Includes:
Autocorrectable
Defined in:
lib/yattho/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 [Yattho::Beta::ClipboardCopy](https://yattho.com/view-components/components/clipboardcopy), please try to use that instead of raw HTML."
ARGUMENT_MAPPER =
ArgumentMappers::ClipboardCopy
COMPONENT =
"Yattho::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

#autocorrect, inherited, #run

Methods included from TagTreeHelpers

#build_tag_tree, #self_closing?