jsx-eslint/eslint-plugin-react

Rule proposal: jsx-padded-children

オープン

#2,045 opened on 2018/11/13

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

Repository metrics

Stars
 (9,293 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Something similar to padded-blocks where it disallows code similar to this:

<div>

  <img />
</div>

Depending on the setting the following should not throw a warning:

// jsx-padded-children: [2, "always"]
<div>

  <img />

</div>

// jsx-padded-children: [2, "never"]
<div>
  <img />
</div>

Not sure if anyone ever would pick up always, that's why I'm also down for jsx-no-padded-children or something like that

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