palantir / tslint-react

:orange_book: Lint rules related to React & JSX for TSLint.
Apache License 2.0
749 stars 76 forks source link

Fix jsx-key can't detect error in parenthesized expression #181

Closed lukyth closed 5 years ago

lukyth commented 6 years ago

Fix #187

The current implementation miss the case where an arrow function returns (); i.e.

[3, 4, 5].map(x => (<App />));
[3, 4, 5].map(x => (<App>app</App>));

It should be the following code instead.

[3, 4, 5].map(x => (<App key={x} />));
[3, 4, 5].map(x => (<App key={x}>app</App>));
palantirtech commented 6 years ago

Thanks for your interest in palantir/tslint-react, @lukyth! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

jasongornall commented 6 years ago

Could really use this!!

lukyth commented 5 years ago

Anything I can do to get this merged?