From fb7218ac5c4de2253cb627c99bc9469635cde98b Mon Sep 17 00:00:00 2001 From: Joel Hawksley Date: Wed, 8 Jun 2022 16:37:44 -0600 Subject: [PATCH] Revert leftover deprecated arguments from 1163 (#1188) * Revert leftover deprecated arguments from 1163 * Create spotty-rats-hide.md * revert tests --- .changeset/spotty-rats-hide.md | 5 ++++ .../cop/primer/deprecated_arguments.rb | 16 ------------ test/rubocop/deprecated_arguments_test.rb | 25 ------------------- 3 files changed, 5 insertions(+), 41 deletions(-) create mode 100644 .changeset/spotty-rats-hide.md diff --git a/.changeset/spotty-rats-hide.md b/.changeset/spotty-rats-hide.md new file mode 100644 index 0000000000..af00f4e863 --- /dev/null +++ b/.changeset/spotty-rats-hide.md @@ -0,0 +1,5 @@ +--- +"@primer/view-components": patch +--- + +Revert leftover deprecated arguments from 1163. diff --git a/lib/rubocop/cop/primer/deprecated_arguments.rb b/lib/rubocop/cop/primer/deprecated_arguments.rb index 435d09ccdc..3f9fc4ea7e 100644 --- a/lib/rubocop/cop/primer/deprecated_arguments.rb +++ b/lib/rubocop/cop/primer/deprecated_arguments.rb @@ -33,22 +33,6 @@ class DeprecatedArguments < BaseCop # } # DEPRECATED = { - is_label_inline: { - true => nil, - false => nil - }, - with_icon: { - true => nil, - false => nil - }, - is_label_visible: { - false => "visually_hide_label: true", - true => "visually_hide_label: false" - }, - is_clearable: { - false => "show_clear_button: false", - true => "show_clear_button: true" - }, bg: { white: "bg: :primary", gray_light: "bg: :secondary", diff --git a/test/rubocop/deprecated_arguments_test.rb b/test/rubocop/deprecated_arguments_test.rb index 7ef17b444c..8edc70a097 100644 --- a/test/rubocop/deprecated_arguments_test.rb +++ b/test/rubocop/deprecated_arguments_test.rb @@ -58,29 +58,4 @@ def test_deprecated_argument_with_nil_not_autocorrected assert_equal 1, cop.offenses.count refute cop.offenses.first.correctable? end - - def test_supports_boolean_values - investigate(cop, <<-RUBY) - Primer::Beta::AutoComplete.new(is_label_visible: false) - RUBY - - assert_equal 1, cop.offenses.count - assert_equal "Primer::Beta::AutoComplete.new(visually_hide_label: true)", cop.offenses.first.corrector.rewrite.strip - end - - def test_identifies_is_label_inline - investigate(cop, <<-RUBY) - Primer::Beta::AutoComplete.new(label_text: "User", is_label_inline: true) - RUBY - - assert_equal 1, cop.offenses.count - end - - def test_identifies_with_icon - investigate(cop, <<-RUBY) - Primer::Beta::AutoComplete.new(label_text: "User", with_icon: true) - RUBY - - assert_equal 1, cop.offenses.count - end end