Skip to content

Commit ac45681

Browse files
authored
Update FlashMigrationCounter guidance to reference un-deprecated component (#3694)
1 parent 7c72ee7 commit ac45681

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/primer/view_components/linters/flash_migration_counter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ class FlashMigrationCounter < BaseLinter
1212

1313
TAGS = %w[div].freeze
1414
CLASSES = %w[flash].freeze
15-
MESSAGE = "We are migrating flashes to use [Primer::Beta::Flash](https://primer.style/view-components/components/beta/flash), please try to use that instead of raw HTML."
15+
MESSAGE = "We are migrating flashes to use [Primer::Alpha::Banner](https://primer.style/view-components/components/alpha/banner), please try to use that instead of raw HTML."
1616
ARGUMENT_MAPPER = ArgumentMappers::Flash
17-
COMPONENT = "Primer::Beta::Flash"
17+
COMPONENT = "Primer::Alpha::Banner"
1818

1919
def map_arguments(tag, tag_tree)
2020
# We can only autocorrect elements with simple text as content.

test/lib/erblint/flash_migration_counter_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_suggests_how_to_use_the_component_with_arguments
1010
@file = "<div class=\"flash flash-warn flash-full\">flash</div>"
1111
@linter.run(processed_source)
1212

13-
assert_includes(offenses.first.message, "render Primer::Beta::Flash.new(scheme: :warning, full: true)")
13+
assert_includes(offenses.first.message, "render Primer::Alpha::Banner.new(scheme: :warning, full: true)")
1414
end
1515

1616
def test_does_not_autocorrect_with_html_content

0 commit comments

Comments
 (0)