-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Feature request: sort-prop-types
should work on TS Props types
#3578
Comments
Can you provide example code? |
Facing the same issue. @ljharb
Although, it is highlighting the error |
Here is the
|
@kshirish autofixing isn't ever a guarantee; if it's warning properly then there's no bug, just perhaps a lack of an enhancement. |
ping @tylerlaprade; can you provide example code? |
@ljharb, I would have expected this to give me an error since "aaa" should be sorted before "zzz".
Config:
|
does it give that error on a class component? In other words, is this a bug with SFCs, or a bug with TS type definitions? (which i'm not sure the rule ever supported) |
|
Yes, I would like to use Props types with this rule - is it possible to add? |
That seems like a reasonable enhancement to add. |
sort-prop-types
does not work on React Functional Componentssort-prop-types
does not work on TS Props types
sort-prop-types
does not work on TS Props typessort-prop-types
should work on TS Props types
Should we close this? as this was fixed with #3615 |
Oh nice! Is it available for me to test out yet? Which version number is it included in? |
Yes, merged with #3615. It's not yet released. |
Thanks @ljharb! When will it be released? I see that the documentation has been updated already. |
The docs you should be reading are on the version tag you’re using; everywhere on github, the docs on the default branch won’t necessarily be releases. |
I see, thanks @ljharb! What is the expected release schedule? |
There isn't a schedule; I'll get to it as soon as I can. |
Checking up on the status since the fix was pushed over six months ago, but there still have been no new releases. Is there a bottleneck I can help with in the release process? Does it require some sort of back-testing? |
Thanks for offering :-) no bottleneck, I just like to get as many PRs into a release as possible. There's 3 open PRs now I'd like to land first. |
Is there an existing issue for this?
Description Overview
It currently only works on Class components, which are not in favor in the codebases in which I work. The rule doesn't trigger any warnings on properties on a functional component.
Expected Behavior
It should behave the same on functional components as it does on class components.
eslint-plugin-react version
v7.32.2
eslint version
8.40.0
node version
v16.17.1
The text was updated successfully, but these errors were encountered: