From 9a0317d500891e8ea2dc59d59c910cb3a49c4b05 Mon Sep 17 00:00:00 2001 From: Hideaki Noshiro <46040697+noshiro-pf@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:16:33 +0900 Subject: [PATCH 1/2] fix schema of jsx-no-constructed-context-values.js --- lib/rules/jsx-no-constructed-context-values.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rules/jsx-no-constructed-context-values.js b/lib/rules/jsx-no-constructed-context-values.js index 2e9ef93422..a8f582ea73 100644 --- a/lib/rules/jsx-no-constructed-context-values.js +++ b/lib/rules/jsx-no-constructed-context-values.js @@ -140,7 +140,7 @@ module.exports = { url: docsUrl('jsx-no-constructed-context-values'), }, messages, - schema: false, + schema: undefined, }, // eslint-disable-next-line arrow-body-style From 81e21f3e349ec68a0f568d14f8e15a0145a79daa Mon Sep 17 00:00:00 2001 From: noshiro-pf Date: Wed, 12 Jun 2024 17:27:06 +0900 Subject: [PATCH 2/2] fix schema and test --- lib/rules/jsx-no-constructed-context-values.js | 2 +- tests/lib/rules/jsx-no-constructed-context-values.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rules/jsx-no-constructed-context-values.js b/lib/rules/jsx-no-constructed-context-values.js index a8f582ea73..60b0a95a90 100644 --- a/lib/rules/jsx-no-constructed-context-values.js +++ b/lib/rules/jsx-no-constructed-context-values.js @@ -140,7 +140,7 @@ module.exports = { url: docsUrl('jsx-no-constructed-context-values'), }, messages, - schema: undefined, + schema: [], }, // eslint-disable-next-line arrow-body-style diff --git a/tests/lib/rules/jsx-no-constructed-context-values.js b/tests/lib/rules/jsx-no-constructed-context-values.js index c8c9dee995..ddcc51685e 100644 --- a/tests/lib/rules/jsx-no-constructed-context-values.js +++ b/tests/lib/rules/jsx-no-constructed-context-values.js @@ -41,7 +41,6 @@ ruleTester.run('react-no-constructed-context-values', rule, { }, { code: 'function Component() { const foo = useMemo(() => { return {} }, []); return ()}', - options: [{ allowArrowFunctions: true }], }, { code: `