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

Fix regression bug in jsx-sort-props #1221

Merged
merged 2 commits into from May 24, 2017

Conversation

jseminck
Copy link
Contributor

This is a fix for: #1175

I have explained the problem already in the issue, but a quick recap:

  • Bug only occurs when using ignoreCase: true and callbacksLast: true
  • isCallbackPropName(propName) looks for pattern: on[A-Z]
  • This pattern can't be found after toLowerCase() has been executed (because of ignoreCase: true

Bug was introduced in 7.0.0. Reverted the code to how it was working originally, and added a test case to cover this specific combination of options.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks!

@ljharb ljharb added the bug label May 24, 2017
@ljharb ljharb merged commit b74a693 into jsx-eslint:master May 24, 2017
@jseminck jseminck deleted the sort-props-regression branch May 30, 2017 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants