Class: ERBLint::Linters::LabelComponentMigrationCounter
- Inherits:
-
BaseLinter
- Object
- Linter
- BaseLinter
- ERBLint::Linters::LabelComponentMigrationCounter
- Includes:
- Autocorrectable
- Defined in:
- lib/primer/view_components/linters/label_component_migration_counter.rb
Overview
Counts the number of times a HTML label is used instead of the component.
Constant Summary collapse
- TAGS =
::Primer::ViewComponents::Constants.get( component: "Primer::Beta::Label", constant: "TAG_OPTIONS" ).freeze
- CLASSES =
%w[Label].freeze
- MESSAGE =
"We are migrating labels to use [Primer::Beta::Label](https://primer.style/view-components/components/label), please try to use that instead of raw HTML."
- ARGUMENT_MAPPER =
ArgumentMappers::Label
- COMPONENT =
"Primer::Beta::Label"
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 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