eslint-plugin-inker
Advanced tools
Comparing version 2.8.2 to 2.8.3
@@ -207,6 +207,4 @@ "use strict"; | ||
fix(fixer) { | ||
var _a; | ||
const variables = context.getDeclaredVariables(declaration); | ||
const variable = variables.find(item => item.name === value.name); | ||
const references = (_a = variable === null || variable === void 0 ? void 0 : variable.references) !== null && _a !== void 0 ? _a : []; | ||
var _a, _b; | ||
const references = (_b = (_a = context.getDeclaredVariables(prop)[0]) === null || _a === void 0 ? void 0 : _a.references) !== null && _b !== void 0 ? _b : []; | ||
return [ | ||
@@ -232,6 +230,5 @@ fixer.replaceText(prop, `${key.name}: ${suggestedName}`), | ||
fix(fixer) { | ||
var _a; | ||
const variables = context.getDeclaredVariables(declaration); | ||
const variable = variables.find(item => item.name === id.name); | ||
const references = (_a = variable === null || variable === void 0 ? void 0 : variable.references) !== null && _a !== void 0 ? _a : []; | ||
var _a, _b; | ||
// eslint-disable-next-line max-len | ||
const references = (_b = (_a = context.getDeclaredVariables(declaration)[0]) === null || _a === void 0 ? void 0 : _a.references) !== null && _b !== void 0 ? _b : []; | ||
return [ | ||
@@ -238,0 +235,0 @@ id, |
{ | ||
"name": "eslint-plugin-inker", | ||
"version": "2.8.2", | ||
"version": "2.8.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
@@ -261,5 +261,3 @@ import { | ||
fix(fixer) { | ||
const variables = context.getDeclaredVariables(declaration) | ||
const variable = variables.find(item => item.name === value.name) | ||
const references = variable?.references ?? [] | ||
const references = context.getDeclaredVariables(prop)[0]?.references ?? [] | ||
return [ | ||
@@ -286,5 +284,4 @@ fixer.replaceText(prop, `${key.name}: ${suggestedName}`), | ||
fix(fixer) { | ||
const variables = context.getDeclaredVariables(declaration) | ||
const variable = variables.find(item => item.name === id.name) | ||
const references = variable?.references ?? [] | ||
// eslint-disable-next-line max-len | ||
const references = context.getDeclaredVariables(declaration)[0]?.references ?? [] | ||
return [ | ||
@@ -291,0 +288,0 @@ id, |
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
61336
1691