Skip to content

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

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

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

Verified

This commit was signed with the committer’s verified signature.
wooorm Titus
Fixes the case where you are iterating over a children prop via the
React.Children API.

Verified

This commit was signed with the committer’s verified signature.
wooorm Titus

Verified

This commit was signed with the committer’s verified signature.
wooorm Titus

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…eact into issues/2083

Verified

This commit was signed with the committer’s verified signature.
wooorm Titus
- 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

@ljharb ljharb added the bug label Dec 21, 2018
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
@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