Skip to content

fix: support React component type aliases in prop-types - #4031

Open
raisulchowdhury wants to merge 1 commit into
jsx-eslint:masterfrom
raisulchowdhury:fix/3159-react-component-aliases
Open

fix: support React component type aliases in prop-types#4031
raisulchowdhury wants to merge 1 commit into
jsx-eslint:masterfrom
raisulchowdhury:fix/3159-react-component-aliases

Conversation

@raisulchowdhury

Copy link
Copy Markdown

Summary

Avoid the react/prop-types false positive for a component type alias that
extends a generic React component type. The TypeScript type analysis now
follows the alias and preserves the existing behavior for ordinary generic
annotations.

Fixes #3159.

Validation

  • focused suite: 1,128 passing
  • full suite: 17,872 passing
  • target lint and type check under Node 20

AI assistance

AI assistance was used for investigation and drafting. I reviewed the
TypeScript type-resolution contract and independently ran the focused and full
suites.

Copilot AI review requested due to automatic review settings July 31, 2026 23:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

react/prop-types false positive “is missing in props validation” for extended component types

3 participants