sindresorhus/eslint-plugin-unicorn
Do you want to work on this issue?
You can request for a bounty in order to promote it!
`no-nested-ternary` does not autofix nested ternary #2008
mvorisek posted onGitHub
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.