From 0479acdb05b29cda759e9df34e08e33168362152 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 18 Jan 2023 10:43:46 -0800 Subject: [PATCH] [Fix] configs: restore `parserOptions` in legacy configs Fixes #3523 --- CHANGELOG.md | 5 +++++ configs/recommended.js | 1 + index.js | 3 +++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8da52c917..215b11630f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ## Unreleased +### Fixed +* configs: restore `parserOptions` in legacy configs ([#3523][] @ljharb) + +[#3520]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3523 + ## [7.32.1] - 2023.01.16 ### Fixed diff --git a/configs/recommended.js b/configs/recommended.js index be146dd8be..0bba09f7bb 100644 --- a/configs/recommended.js +++ b/configs/recommended.js @@ -3,6 +3,7 @@ const all = require('./all'); module.exports = Object.assign({}, all, { + languageOptions: all.languageOptions, rules: { 'react/display-name': 2, 'react/jsx-key': 2, diff --git a/index.js b/index.js index 2c47ef6bec..4140c6c881 100644 --- a/index.js +++ b/index.js @@ -16,12 +16,15 @@ module.exports = { rules: allRules, configs: { recommended: Object.assign({}, configRecommended, { + parserOptions: configRecommended.languageOptions.parserOptions, plugins, }), all: Object.assign({}, configAll, { + parserOptions: configAll.languageOptions.parserOptions, plugins, }), 'jsx-runtime': Object.assign({}, configRuntime, { + parserOptions: configRuntime.languageOptions.parserOptions, plugins, }), },