Open
Description
Description of the false positive
The variable is defined with var originalLog = console.log;
. typeof console.log
is function
or object
(an exotic implementation object that is callable) depending on the browser.
The warning says it has type "boolean, date, number, object, regular expression or string" - there's a few problems with this:
- Dates and RegExps are not a type in JS (and if they are, Arrays, Maps, Sets, Promises, etc are too)
- this is also missing
symbol
andbigint
- Given the possible exotic type of
console.log
asobject
- a callable object - this is not actually a valid warning.
URL to the alert on the project page on LGTM.com