sindresorhus/eslint-plugin-unicorn
`no-nested-ternary` does not autofix nested ternary
Geschlossen
#2.008 geöffnet am 07.12.2022
docshelp wantedwontfix
Repository-Metriken
- Stars
- (5.022 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 4h 30m) (26 gemergte PRs in 30 T)
Beschreibung
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.