From 756aaa49cab7b78dbec001d9e621a9aae64097db Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 18 Jan 2023 10:57:02 -0800 Subject: [PATCH] [Fix] `jsx-no-constructed-context-values`, `jsx-no-useless-fragment`: add a rule schema --- CHANGELOG.md | 1 + lib/rules/jsx-no-constructed-context-values.js | 1 + lib/rules/jsx-no-useless-fragment.js | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 215b11630f..8f716f017c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ### Fixed * configs: restore `parserOptions` in legacy configs ([#3523][] @ljharb) +* [`jsx-no-constructed-context-values`], [`jsx-no-useless-fragment`]: add a rule schema (@ljharb) [#3520]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3523 diff --git a/lib/rules/jsx-no-constructed-context-values.js b/lib/rules/jsx-no-constructed-context-values.js index ac34ead85e..8bcf045dad 100644 --- a/lib/rules/jsx-no-constructed-context-values.js +++ b/lib/rules/jsx-no-constructed-context-values.js @@ -138,6 +138,7 @@ module.exports = { url: docsUrl('jsx-no-constructed-context-values'), }, messages, + schema: {}, }, // eslint-disable-next-line arrow-body-style diff --git a/lib/rules/jsx-no-useless-fragment.js b/lib/rules/jsx-no-useless-fragment.js index 56c6baea70..2d2711a5f9 100644 --- a/lib/rules/jsx-no-useless-fragment.js +++ b/lib/rules/jsx-no-useless-fragment.js @@ -94,6 +94,14 @@ module.exports = { url: docsUrl('jsx-no-useless-fragment'), }, messages, + schema: [{ + type: 'object', + properties: { + allowExpressions: { + type: 'boolean', + }, + }, + }], }, create(context) {