-
-
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
Why is rule named "jsx-sort-prop-types"? #87
Comments
Yes, there is no reason to have |
@yannickcr if someone were to whip up a PR for this, should it be backwards compatible with regards to rule setting in .esslintrc etc? |
@pwmckenna I think we should rename the rule and keep the current one as an alias for now, but with a deprecation warning (like Then, in a later time, remove it in a new major release. |
This rule has nothing to do with JSX, so it doesn't make sense for "jsx" to appear in its name. To prevent breaking this rule for people, I have set up jsx-sort-prop-types as an alias with a deprecation warning. Eventually, we should remove it altogether. For the deprecation warning, I borrowed code from jsx-quotes. While I was at it, I corrected some minor wording issues in the documentation for this rule (mostly using "propTypes" instead of "propsTypes"). Fixes jsx-eslint#87.
This rule has nothing to do with JSX, so it doesn't make sense for "jsx" to appear in its name. To prevent breaking this rule for people, I have set up jsx-sort-prop-types as an alias with a deprecation warning. Eventually, we should remove it altogether. For the deprecation warning, I borrowed code from jsx-quotes. While I was at it, I corrected some minor wording issues in the documentation for this rule (mostly using "propTypes" instead of "propsTypes"). Fixes jsx-eslint#87.
Sorry if this is a dumb question, but why does the "jsx-sort-prop-types" rule contain "jsx" in the name? It seems to me that it's just about component definitions.
The text was updated successfully, but these errors were encountered: