From ea56c432b7a577d3805d1a7b4b46596799dd892e Mon Sep 17 00:00:00 2001 From: Matin Zadeh Dolatabad <24797481+matinzd@users.noreply.github.com> Date: Thu, 19 Dec 2024 06:02:32 -0800 Subject: [PATCH] Disable react-in-jsx-scope rule in eslint config (#46587) Summary: All newly generated react native apps are still showing warnings to use react in the jsx scope. That is not needed anymore as of react 18 with built-in jsx transform plugin. Reproduction: https://github.com/matinzd/react-in-jsx-warning-repro Run `npm run lint` in this repo. ## Changelog: [GENERAL] [FIXED] - Disable `react-in-jsx-scope` rule in eslint config Pull Request resolved: https://github.com/facebook/react-native/pull/46587 Test Plan: Initiate a new template with community CLI and you should not see this warning anymore. Reviewed By: christophpurrer Differential Revision: D67394923 Pulled By: cipolleschi fbshipit-source-id: cfe8e44e33e1b3ae9fe17ca56dd3c7258b7bff69 --- packages/eslint-config-react-native/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-react-native/index.js b/packages/eslint-config-react-native/index.js index 241bbfa09f2c61..0b45754e0ce1ab 100644 --- a/packages/eslint-config-react-native/index.js +++ b/packages/eslint-config-react-native/index.js @@ -315,7 +315,7 @@ module.exports = { 'react/no-string-refs': 2, 'react/no-unknown-property': 0, 'react/no-unstable-nested-components': 1, - 'react/react-in-jsx-scope': 1, + 'react/react-in-jsx-scope': 0, 'react/self-closing-comp': 1, 'react/wrap-multilines': 0,