Skip to content

Disable react-in-jsx-scope rule in eslint config#46587

Closed
matinzd wants to merge 2 commits intofacebook:mainfrom
matinzd:patch-1
Closed

Disable react-in-jsx-scope rule in eslint config#46587
matinzd wants to merge 2 commits intofacebook:mainfrom
matinzd:patch-1

Conversation

@matinzd
Copy link
Copy Markdown
Contributor

@matinzd matinzd commented Sep 20, 2024

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

Test Plan:

Initiate a new template with community CLI and you should not see this warning anymore.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Sep 20, 2024
@matinzd
Copy link
Copy Markdown
Contributor Author

matinzd commented Oct 31, 2024

@cortinico Sorry for tagging you here. Any plans to merge this?

@cortinico
Copy link
Copy Markdown
Contributor

Sorry for the delay.

All newly generated react native apps are still showing warnings to use react in the jsx scope.

Which warnings are you referring to @matinzd ? I haven't seen any warning related to what you're mentioning recently 🤔

@matinzd
Copy link
Copy Markdown
Contributor Author

matinzd commented Nov 2, 2024

ESLint will warn about importing React everywhere when you create a new React Native project that depends on this configuration.

@sunnylqm
Copy link
Copy Markdown
Contributor

@cortinico

QQ20241214-171616

@matinzd
Copy link
Copy Markdown
Contributor Author

matinzd commented Dec 18, 2024

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Dec 19, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cipolleschi merged this pull request in ea56c43.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @matinzd in ea56c43

When will my fix make it into a release? | How to file a pick request?

@matinzd matinzd deleted the patch-1 branch December 20, 2024 19:17
blancham pushed a commit to kraaft-co/eslint-config-react-native that referenced this pull request Jan 13, 2026
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: facebook/react-native#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants