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

[Docs] jsx-key: fix correct example #3656

Merged

Conversation

developer-bandi
Copy link
Contributor

In the 3rd item of the correct example, x.id is used as the key. However, since an number type array is entered in Array.from, x is a number, all keys have undefined. Additionally, searching the number property is generally considered an error in TypeScript.

Therefore, the key was modified to use x itself so that the key has a unique value and does not cause an error in TypeScript.

Copy link

codecov bot commented Nov 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3fb79e1) 97.65% compared to head (48318fa) 97.65%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3656   +/-   ##
=======================================
  Coverage   97.65%   97.65%           
=======================================
  Files         132      132           
  Lines        9375     9375           
  Branches     3432     3432           
=======================================
  Hits         9155     9155           
  Misses        220      220           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ljharb ljharb merged commit 48318fa into jsx-eslint:master Nov 23, 2023
309 checks passed
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.

None yet

2 participants