The documentation for this rule mentions that Number.isNaN
and isNaN
have slightly diffent behavior, as Number.isNaN
doesn't coerce to number
first. However when the argument is known to be a number (see example code below), auto-fixing to Number.isNaN
does not change the behavior
if (typeof offset !== "number" || isNaN(offset)) {
// this should be auto-fixed
}
const num: number = 5;
isNaN(num); // This too
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too