sindresorhus/eslint-plugin-unicorn

`no-nested-ternary` does not autofix nested ternary

クローズ

#2,008 opened on 2022/12/07

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (468 件のフォーク)user submission
docshelp wantedwontfix

Repository metrics

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

説明

var cellText = isYear
    ? i
    : isMonth
        ? settings.text.monthsShort[i]
        : isDay
            ? cellDate.getDate()
            : module.helper.dateFormat(formatter.cellTime, cellDate);

When the rule can autofix ternary (add parenthesis around), I would expect it to fix any level of nesting.

Currently it seems it can autofix only 2 nested ternary operators.

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