jsx-eslint/eslint-plugin-react
GitHub で見るRule proposal: prevent object literal spreads
Open
#2,217 opened on 2019年3月26日
help wantednew rule
Repository metrics
- Stars
- (8,630 stars)
- PR merge metrics
- (平均マージ 1d 17h) (30d で 3 merged PRs)
説明
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).