Class: ERBLint::Linters::ButtonComponentMigrationCounter
- Inherits:
-
BaseLinter
- Object
- Linter
- BaseLinter
- ERBLint::Linters::ButtonComponentMigrationCounter
- Includes:
- Autocorrectable
- Defined in:
- lib/primer/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 =
Primer::ViewComponents::Constants.get( component: "Primer::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 [Primer::Beta::Button](https://primer.style/view-components/components/beta/button), please try to use that instead of raw HTML."
- ARGUMENT_MAPPER =
ArgumentMappers::Button
- COMPONENT =
"Primer::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
Methods inherited from BaseLinter
Methods included from Helpers::RuleHelpers
#erb_nodes, #extract_ruby_from_erb_node, #generate_node_offense, #generate_offense, #tags