jsx-eslint/eslint-plugin-react

Rule proposal: prevent object literal spreads

オープン

#2,217 opened on 2019/03/26

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (2,733 件のフォーク)batch import
help wantednew rule

Repository metrics

Stars
 (9,293 個のスター)
PR merge metrics
 (30d に merged 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).

コントリビューターガイド