jsx-eslint/eslint-plugin-react

Rule proposal: prevent object literal spreads

开放

#2,217 创建于 2019年3月26日

 (1 条评论) (0 个反应) (0 位负责人)JavaScript (2,733 个派生)batch import
help wantednew rule

仓库指标

星标
 (9,293 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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).

贡献者指南