sindresorhus/eslint-plugin-unicorn
`no-nested-ternary` does not autofix nested ternary
Closed
#2,008 opened on Dec 7, 2022
docshelp wantedwontfix
Repository metrics
- Stars
- (5,022 stars)
- PR merge metrics
- (Avg merge 1d 16h) (399 merged PRs in 30d)
Description
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.