✅ This rule is part of the recommended config.
🔧 This rule is auto-fixable.
The instanceof Array
check doesn't work across realms/contexts, for example, frames/windows in browsers or the vm
module in Node.js.
array instanceof Array;
[1,2,3] instanceof Array;
Array.isArray(array);
Array.isArray([1,2,3]);