Class: ERBLint::Linters::CloseButtonComponentMigrationCounter

Inherits:
BaseLinter
  • Object
show all
Includes:
Autocorrectable, Helpers::RubocopHelpers
Defined in:
lib/yattho/view_components/linters/close_button_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[button].freeze
CLASSES =
%w[close-button].freeze
MESSAGE =
"We are migrating close-button to use [Yattho::Beta::CloseButton](https://yattho.com/view-components/components/beta/closebutton), please try to use that instead of raw HTML."
ARGUMENT_MAPPER =
ArgumentMappers::CloseButton
COMPONENT =
"Yattho::Beta::CloseButton"
ALLOWED_OCTICON_ARGS =
%w[icon aria-label aria].freeze

Constants inherited from BaseLinter

BaseLinter::DISALLOWED_CLASSES, BaseLinter::DUMP_FILE, BaseLinter::REQUIRED_ARGUMENTS

Constants included from TagTreeHelpers

TagTreeHelpers::SELF_CLOSING_TAGS

Method Summary

Methods included from Helpers::RubocopHelpers

#erb_ast

Methods included from Autocorrectable

#message

Methods inherited from BaseLinter

#autocorrect, inherited, #run

Methods included from TagTreeHelpers

#build_tag_tree, #self_closing?