palantir / tslint-react

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

jsx-key support array methods #115

Closed giladgray closed 5 years ago

giladgray commented 7 years ago

jsx-key does not flag this element as missing key:

const myArray: JSX.Element[] = [];
myArray.push(
    <li className="missing-key">no tslint error</li>
);
return <ul>{myArray}</ul>
adidahiya commented 7 years ago

this is doable, but requires making the rule implementation an "optionally typed rule" which uses the type checker when it's available

adidahiya commented 5 years ago

Closing due to age and deprecation timeline, see #210