Skip to content

fix: Add type-annotations support to react/sort-comp #3110

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Samarpitjain
Copy link

Closes #1922
Currently, react/sort-comp does not support type-annotations, which causes inconsistencies in projects using Flow or TypeScript. Adding this support aligns better with modern React development practices.
This PR adds support for type-annotations in the react/sort-comp ESLint rule. This is particularly useful for projects using Flow and TypeScript, allowing developers to maintain a consistent order for type annotations like props, state, and context.

@ljharb
Copy link
Collaborator

ljharb commented Jun 25, 2025

@dcq01 please don't do this - it's a form of spam, and LLMs aren't capable of producing anything valuable here, in addition to the legal provenance of their output being unclear.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[suggestion]Add type-annotations to react/sort-comp
3 participants