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: no-array-index-key not working in React.Children methods #2085

Merged
merged 5 commits into from Dec 22, 2018
Merged

Fix: no-array-index-key not working in React.Children methods #2085

merged 5 commits into from Dec 22, 2018

Conversation

himynameisdave
Copy link
Contributor

The no-array-index-key was not flagging any errors when iterating via React.Children methods. This fixes that!

Fixes #2083

spin-skull

lib/rules/no-array-index-key.js Outdated Show resolved Hide resolved
lib/rules/no-array-index-key.js Outdated Show resolved Hide resolved
- Uses pragma context instead of 'React'
- Adds back spaces I removed which increase readability
@himynameisdave
Copy link
Contributor Author

@ljharb I've addressed your CR comments, please read through again and let me know if there is anything else you need me to change! 💪👌🤙

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.

We’ll probably want to move the method to utils later, but this lgtm

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.

LGTM. Nice change.

@ljharb ljharb merged commit 14451d4 into jsx-eslint:master Dec 22, 2018
@himynameisdave himynameisdave deleted the issues/2083 branch December 26, 2018 15:04
This was referenced Jan 4, 2019
@ghost ghost mentioned this pull request Jan 12, 2019
1 task
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.

no-array-index-key not working in React.Children.map
3 participants