Skip to content

Commit

Permalink
[Fix] configs: avoid legacy config system error
Browse files Browse the repository at this point in the history
Fixes #3465. Fixes #3461.
  • Loading branch information
ljharb committed Oct 17, 2022
1 parent 4cfe5d2 commit 611b9ee
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions configs/all.js
Expand Up @@ -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 });
3 changes: 3 additions & 0 deletions configs/jsx-runtime.js
Expand Up @@ -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 });
3 changes: 3 additions & 0 deletions configs/recommended.js
Expand Up @@ -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 });

0 comments on commit 611b9ee

Please sign in to comment.