jsx-eslint/eslint-plugin-react
Rule proposal: prevent object literal spreads
Aberta
#2.217 aberto em 26 de mar. de 2019
help wantednew rule
Métricas do repositório
- Stars
- (9.292 estrelas)
- Métricas de merge de PR
- (Nenhuma PRs mesclada em 30d)
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).