From 3385caa2bc6e9f2fb46e4faa8ce2cca62df20ffc Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 16 Apr 2020 16:57:44 -0700 Subject: [PATCH] [Tests] `button-has-type`: ensure no mistakenly allowed identifiers named `button`/`submit`/`reset` See https://github.com/yannickcr/eslint-plugin-react/issues/1846#issuecomment-614921516 --- tests/lib/rules/button-has-type.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/lib/rules/button-has-type.js b/tests/lib/rules/button-has-type.js index 15e5257c24..da343af73e 100644 --- a/tests/lib/rules/button-has-type.js +++ b/tests/lib/rules/button-has-type.js @@ -118,6 +118,12 @@ ruleTester.run('button-has-type', rule, { pragma: 'Foo' } } + }, + { + code: 'function Button({ type, ...extraProps }) { const button = type; return