jsx-eslint/eslint-plugin-react
Auf GitHub ansehenRule proposal: prevent object literal spreads
Open
#2.217 geöffnet am 26. März 2019
help wantednew rule
Repository-Metriken
- Stars
- (8.630 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 1T 17h) (3 gemergte PRs in 30 T)
Beschreibung
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).