]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/lib/rules/no-new-symbol.js
update to 7.1.0 sources
[pve-eslint.git] / eslint / lib / rules / no-new-symbol.js
index cb7e4f0fc88d6994470fb0392f6a5670a17d3bb1..aeb509c0d9c1424396f4a5a684fd62fb14cb75da 100644 (file)
@@ -37,8 +37,9 @@ module.exports = {
                 if (variable && variable.defs.length === 0) {
                     variable.references.forEach(ref => {
                         const node = ref.identifier;
+                        const parent = node.parent;
 
-                        if (node.parent && node.parent.type === "NewExpression") {
+                        if (parent && parent.type === "NewExpression" && parent.callee === node) {
                             context.report({
                                 node,
                                 messageId: "noNewSymbol"