From 19d4491fd063f87cfe934270420152c7389f673f Mon Sep 17 00:00:00 2001 From: Matthew Astley Date: Tue, 11 Oct 2022 10:02:09 +0100 Subject: [PATCH 1/2] new failing test this test is derived from a real bug in a project, in which the intention was to get it right but the bug causes "two wrongs make a right" this one failing test is intended to illustrate an entire class of possible failures which are neither detected nor thoroughly represented and although the apparent *intention* of the "bad" code is `target="_blank"` the *effect* is not, so unless the browser DWIMs it then the jsx-no-target-blank rule is technically not violated --- tests/lib/rules/jsx-no-target-blank.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/lib/rules/jsx-no-target-blank.js b/tests/lib/rules/jsx-no-target-blank.js index 2208e371dc..eec6176454 100644 --- a/tests/lib/rules/jsx-no-target-blank.js +++ b/tests/lib/rules/jsx-no-target-blank.js @@ -197,6 +197,11 @@ ruleTester.run('jsx-no-target-blank', rule, { output: '', errors: defaultErrors, }, + { + code: '' + output: '', + errors: [{ messageId: 'noTargetBlankIntendedIneffective' }], + }, { code: '', output: '', From df7d7c29cbb90e6810f3e435d9f7982ae5d8782f Mon Sep 17 00:00:00 2001 From: Matthew Astley Date: Tue, 11 Oct 2022 11:19:19 +0100 Subject: [PATCH 2/2] typo --- tests/lib/rules/jsx-no-target-blank.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/rules/jsx-no-target-blank.js b/tests/lib/rules/jsx-no-target-blank.js index eec6176454..e43003db81 100644 --- a/tests/lib/rules/jsx-no-target-blank.js +++ b/tests/lib/rules/jsx-no-target-blank.js @@ -198,7 +198,7 @@ ruleTester.run('jsx-no-target-blank', rule, { errors: defaultErrors, }, { - code: '' + code: '', output: '', errors: [{ messageId: 'noTargetBlankIntendedIneffective' }], },