svelte-eslint-parser
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -611,12 +611,19 @@ "use strict"; | ||
function removeReference(reference, baseScope) { | ||
if (reference.resolved && | ||
reference.resolved.defs.some((d) => d.name === reference.identifier)) { | ||
// remove var | ||
const varIndex = baseScope.variables.indexOf(reference.resolved); | ||
if (varIndex >= 0) { | ||
baseScope.variables.splice(varIndex, 1); | ||
if (reference.resolved) { | ||
if (reference.resolved.defs.some((d) => d.name === reference.identifier)) { | ||
// remove var | ||
const varIndex = baseScope.variables.indexOf(reference.resolved); | ||
if (varIndex >= 0) { | ||
baseScope.variables.splice(varIndex, 1); | ||
} | ||
const name = reference.identifier.name; | ||
if (reference.resolved === baseScope.set.get(name)) { | ||
baseScope.set.delete(name); | ||
} | ||
} | ||
const name = reference.identifier.name; | ||
if (reference.resolved === baseScope.set.get(name)) { | ||
baseScope.set.delete(name); | ||
else { | ||
const refIndex = reference.resolved.references.indexOf(reference); | ||
if (refIndex >= 0) { | ||
reference.resolved.references.splice(refIndex, 1); | ||
} | ||
} | ||
@@ -623,0 +630,0 @@ } |
{ | ||
"name": "svelte-eslint-parser", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Svelte parser for ESLint", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
157478
3762