pasika 0.10.63 → 0.10.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5136,11 +5136,11 @@ function listStatement(node) {
|
|
|
5136
5136
|
function identifierPropertyFixes(context, node, value, propertyName4, fixer) {
|
|
5137
5137
|
if (value.name === propertyName4) return [fixer.replaceText(node, propertyName4)];
|
|
5138
5138
|
const variable = findVariable(context, value);
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
];
|
|
5139
|
+
const definition = variable?.defs[0];
|
|
5140
|
+
if (variable?.defs.length !== 1 || definition?.type !== "Variable" || definition.parent.kind !== "const" || definition.node.id.type !== "Identifier") {
|
|
5141
|
+
return [];
|
|
5142
|
+
}
|
|
5143
|
+
return [fixer.replaceText(definition.node.id, propertyName4), fixer.replaceText(node, propertyName4)];
|
|
5144
5144
|
}
|
|
5145
5145
|
function memberPropertyFixes(context, node, value, propertyName4, source, fixer) {
|
|
5146
5146
|
const statement = listStatement(node);
|