jsx-eslint/eslint-plugin-react
Voir sur GitHubRule proposal: prevent object literal spreads
Open
#2 217 ouverte le 26 mars 2019
help wantednew rule
Métriques du dépôt
- Stars
- (8 630 stars)
- Métriques de merge PR
- (Merge moyen 1j 17h) (3 PRs mergées en 30 j)
Description
In JSX it's possible to write:
<Foo {...{a: 1, b: 2}} />
instead of
<Foo a={1} b={2} />
The former is valid JSX but (to React eyes) hard to read. It would be good to lint against it (it may be autofixable too, not sure about edge cases).