ESLint 10.9.0 adds a new checkConditionalExpressions option to the no-unmodified-loop-condition rule, letting the rule check each branch of a ternary expression independently for unmodified loop conditions. The release also fixes unsafe autofixes in no-var (hoisted functions and catch-parameter shadowing) and prefer-template (tagged template calls), plus handles underflow in no-loss-of-precision, along with several documentation and dependency chores.
Questions this post answers
What does the checkConditionalExpressions option do in ESLint's no-unmodified-loop-condition rule?
It makes the no-unmodified-loop-condition rule check each branch of a ternary expression independently for unmodified variables, available starting in ESLint 10.9.0. For example, with the option enabled, a loop condition like `chunk ? !done : false` will report the `done` variable as not modified inside the loop, even though `chunk` is being reassigned. Track new ESLint rule options like this on daily.dev before they surface as unexpected lint failures.
Does ESLint 10.9.0 fix any unsafe autofix bugs in no-var?
Yes, ESLint 10.9.0 fixes two unsafe autofix issues in the no-var rule: one that could produce broken code when a var declaration is hoisted alongside function declarations, and another where autofix incorrectly applied when a var was shadowed by a catch parameter. The prefer-template rule's autofix was also fixed to avoid incorrectly creating a tagged template call. Developers upgrading lint configs track autofix regressions like these on daily.dev before they hit CI.