From ed64b247f2434b0f1d9feaa98a4e6c64e978ea7c Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 11 Sep 2024 11:35:47 -0700 Subject: [PATCH] [Fix] `jsx-props-no-spreading`: add `explicitSpread` option to schema Fixes #3799 --- CHANGELOG.md | 2 ++ lib/rules/jsx-props-no-spreading.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aa2c37164..6d08f1f0a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ### Fixed * [`function-component-definition`], [`boolean-prop-naming`], [`jsx-first-prop-new-line`], [`jsx-props-no-multi-spaces`], `propTypes`: use type args ([#3629][] @HenryBrown0) * JSX pragma: fail gracefully ([#3632][] @ljharb) +* [`jsx-props-no-spreading`]: add `explicitSpread` option to schema ([#3799][] @ljharb) ### Changed * [Tests] add @typescript-eslint/parser v6 ([#3629][] @HenryBrown0) @@ -21,6 +22,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [types] add jsdoc type annotations ([#3731][] @y-hsgw) * [Tests] `button-has-type`: add test case with spread ([#3731][] @y-hsgw) +[#3799]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3799 [#3632]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3632 [#3812]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3812 diff --git a/lib/rules/jsx-props-no-spreading.js b/lib/rules/jsx-props-no-spreading.js index a608011cd1..1aa8ab4ace 100644 --- a/lib/rules/jsx-props-no-spreading.js +++ b/lib/rules/jsx-props-no-spreading.js @@ -60,6 +60,9 @@ module.exports = { custom: { enum: [OPTIONS.enforce, OPTIONS.ignore], }, + explicitSpread: { + enum: [OPTIONS.enforce, OPTIONS.ignore], + }, exceptions: { type: 'array', items: {