Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove react/prop-types from the recommended config #3753

Open
Arkellys opened this issue May 11, 2024 · 1 comment
Open

Remove react/prop-types from the recommended config #3753

Arkellys opened this issue May 11, 2024 · 1 comment

Comments

@Arkellys
Copy link

React 19 will remove propTypes validation for function:

In React 19, we’re removing the propType checks from the React package, and using them will be silently ignored. If you’re using propTypes, we recommend migrating to TypeScript or another type-checking solution.

I suppose it can wait for v19 official release, but given this change I think the rule react/prop-types should be removed from the recommended configuration.

@ljharb
Copy link
Member

ljharb commented May 11, 2024

It shouldn’t be removed ever - it also enforces TS types.

However, it shouldn’t allow or suggest/push runtime propTypes if the react version is 19+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants