Class: ERBLint::Linters::ButtonComponentMigrationCounter
- Inherits:
-
BaseLinter
- Object
- Linter
- BaseLinter
- ERBLint::Linters::ButtonComponentMigrationCounter
- Includes:
- Autocorrectable
- Defined in:
- lib/yattho/view_components/linters/button_component_migration_counter.rb
Overview
Counts the number of times a HTML button is used instead of the component.
Constant Summary collapse
- TAGS =
Yattho::ViewComponents::Constants.get( component: "Yattho::Beta::BaseButton", constant: "TAG_OPTIONS" ).freeze
- DISALLOWED_CLASSES =
CloseButton component has preference when this class is seen in conjunction with ‘btn`.
%w[close-button].freeze
- CLASSES =
%w[btn btn-link].freeze
- MESSAGE =
"We are migrating buttons to use [Yattho::Beta::Button](https://yattho.com/view-components/components/beta/button), please try to use that instead of raw HTML."
- ARGUMENT_MAPPER =
ArgumentMappers::Button
- COMPONENT =
"Yattho::Beta::Button"
Constants inherited from BaseLinter
ERBLint::Linters::BaseLinter::DUMP_FILE, ERBLint::Linters::BaseLinter::REQUIRED_ARGUMENTS
Constants included from TagTreeHelpers
TagTreeHelpers::SELF_CLOSING_TAGS
Method Summary
Methods included from Autocorrectable
#correction, #map_arguments, #message