Skip to content

Commit 611b9ee

Browse files
committed
[Fix] configs: avoid legacy config system error
Fixes #3465. Fixes #3461.
1 parent 4cfe5d2 commit 611b9ee

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
1111
* add [`sort-default-props`] and deprecate [`jsx-sort-default-props`] ([#1861][] @alexzherdev)
1212
* add [`no-object-type-as-default-prop`] rule ([#2848][] @cyan33 @fengkx)
1313

14+
### Fixed
15+
* configs: avoid legacy config system error ([#3461][] @ljharb)
16+
1417
### Changed
1518
* [Perf] component detection: improve performance by avoiding traversing parents unnecessarily ([#3459][] @golopot)
1619

20+
[#3461]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3461
1721
[#3459]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3459
1822
[#3449]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3449
1923
[#3424]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3429

configs/all.js

+3
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,6 @@ module.exports = {
123123
},
124124
rules: allRules,
125125
};
126+
127+
// this is so the `languageOptions` property won't be warned in the new config system
128+
Object.defineProperty(module.exports, 'languageOptions', { enumerable: false });

configs/jsx-runtime.js

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ module.exports = Object.assign({}, all, {
1313
'react/jsx-uses-react': 0,
1414
},
1515
});
16+
17+
// this is so the `languageOptions` property won't be warned in the new config system
18+
Object.defineProperty(module.exports, 'languageOptions', { enumerable: false });

configs/recommended.js

+3
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ module.exports = Object.assign({}, all, {
2828
'react/require-render-return': 2,
2929
},
3030
});
31+
32+
// this is so the `languageOptions` property won't be warned in the new config system
33+
Object.defineProperty(module.exports, 'languageOptions', { enumerable: false });

0 commit comments

Comments
 (0)