diff --git a/CHANGELOG.md b/CHANGELOG.md index d28374af5f..e70c0cc101 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,13 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * add [`sort-default-props`] and deprecate [`jsx-sort-default-props`] ([#1861][] @alexzherdev) * add [`no-object-type-as-default-prop`] rule ([#2848][] @cyan33 @fengkx) +### Fixed +* configs: avoid legacy config system error ([#3461][] @ljharb) + ### Changed * [Perf] component detection: improve performance by avoiding traversing parents unnecessarily ([#3459][] @golopot) +[#3461]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3461 [#3459]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3459 [#3449]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3449 [#3424]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3429 diff --git a/configs/all.js b/configs/all.js index e0134738df..302fbaf88e 100644 --- a/configs/all.js +++ b/configs/all.js @@ -123,3 +123,6 @@ module.exports = { }, rules: allRules, }; + +// this is so the `languageOptions` property won't be warned in the new config system +Object.defineProperty(module.exports, 'languageOptions', { enumerable: false }); diff --git a/configs/jsx-runtime.js b/configs/jsx-runtime.js index 3caf18965c..a6302be504 100644 --- a/configs/jsx-runtime.js +++ b/configs/jsx-runtime.js @@ -13,3 +13,6 @@ module.exports = Object.assign({}, all, { 'react/jsx-uses-react': 0, }, }); + +// this is so the `languageOptions` property won't be warned in the new config system +Object.defineProperty(module.exports, 'languageOptions', { enumerable: false }); diff --git a/configs/recommended.js b/configs/recommended.js index 09189a2199..be146dd8be 100644 --- a/configs/recommended.js +++ b/configs/recommended.js @@ -28,3 +28,6 @@ module.exports = Object.assign({}, all, { 'react/require-render-return': 2, }, }); + +// this is so the `languageOptions` property won't be warned in the new config system +Object.defineProperty(module.exports, 'languageOptions', { enumerable: false });