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

Rule sort-prop-types add noSortAlphabetically #1897

Merged
merged 3 commits into from
Aug 13, 2018

Conversation

christophehurpeau
Copy link
Contributor

Same as #979

@christophehurpeau
Copy link
Contributor Author

@yannickcr @lencioni @EvHaus can any of you review this ? Thank you so much in advance !

Copy link
Collaborator

@EvHaus EvHaus left a comment

Choose a reason for hiding this comment

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

Seems really weird to me to have an option to disable sorting on a rule that is supposed to enforce it. Do you have any examples of how this option will be used?

Otherwise, code LGTM

@christophehurpeau
Copy link
Contributor Author

Thanks !
My team voted against the alphabetical rule because they prefer to sort some data (for example put user first on <User user={user} avatar={avatar} onClick={onClick} /> :

User.propTypes = {
  user: UserShape.isRequired,
  avatar: AvatarShape.isRequired,
  onClick: PropTypes.func.isRequired,
}

But still be able to use requiredFirst and callbacksLast :)

@ljharb ljharb merged commit 564107c into jsx-eslint:master Aug 13, 2018
@christophehurpeau
Copy link
Contributor Author

Thanks for merging ! I know you just released 7.11.0, but do you plan to make another release with this soon ?

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

Successfully merging this pull request may close these issues.

3 participants