eslint-plugin-no-use-extend-native
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "eslint-plugin-no-use-extend-native", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "ESLint plugin to prevent use of extended native objects", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -52,4 +52,5 @@ 'use strict'; | ||
proto = binaryExpressionProduces(node.object); | ||
} else if (node.object.type === 'Identifier') { | ||
} else if (node.object.type === 'Identifier' && node.property.name === 'prototype') { | ||
proto = node.object.name; | ||
methodName = node.parent.property.name; | ||
} else { | ||
@@ -59,10 +60,5 @@ proto = node.object.type.replace('Expression', ''); | ||
methodName = node.property.name || node.property.value; | ||
methodName = methodName || node.property.name || node.property.value; | ||
type = node.parent.type; | ||
if (methodName === 'prototype') { | ||
// Array.prototype.map, etc. | ||
methodName = node.parent.property.name; | ||
} | ||
if (!isJsType(proto)) { | ||
@@ -69,0 +65,0 @@ return; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7078
70