sindresorhus/eslint-plugin-unicorn

`no-useless-fallback-in-spread`: Support ternary

クローズ

#1,861 opened on 2022/07/19

 (4 件のコメント) (7 件のリアクション) (0 人の担当者)JavaScript (468 件のフォーク)user submission
enhancementhelp wanted

Repository metrics

Stars
 (5,022 個のスター)
PR merge metrics
 (平均マージ 4h 30m) (30d で 26 merged PRs)

説明

The rule currently does not detect ternary like this:

{...(foo ? {bar: true} : {})}

This can be safely be reduced to

{...(foo && {bar: true})}

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