massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / eslint / lib / rules / use-isnan.js
index 0c7e888c976d8d19729aff7bb8e49568dfb729f9..ef95b21314a1ce99d5a6abc9d7e14f61a3a58b26 100644 (file)
@@ -21,7 +21,10 @@ const astUtils = require("./utils/ast-utils");
  * @returns {boolean} `true` if the node is 'NaN' identifier.
  */
 function isNaNIdentifier(node) {
-    return Boolean(node) && node.type === "Identifier" && node.name === "NaN";
+    return Boolean(node) && (
+        astUtils.isSpecificId(node, "NaN") ||
+        astUtils.isSpecificMemberAccess(node, "Number", "NaN")
+    );
 }
 
 //------------------------------------------------------------------------------