ESlint has a rule
no-restricted-globals which by default will error on things like this
isFinite. If you convert these to
Number.isFinite you will placate the Eslint machine and rainbows and unicorns will appear.
Number.isFinite vs isFinite
Number.isFinite() does not convert the values to a Number, and will not return true for any value that is not of the type Number.https://www.w3schools.com/jsref/jsref_isfinite_number.asp
Number.isNaN vs NaN
Number.isNaN() is different from the global isNaN() function. The global isNaN() function converts the tested value to a Number, then tests it.
Number.isNaN() does not convert the values to a Number, and will not return true for any value that is not of the type Number.https://www.w3schools.com/jsref/jsref_isnan_number.asp
Be careful trying to placate the ESlint machine. Global functions and global constructor methods of the same name are not guaranteed to produce the same result.