pasika 0.10.81 → 0.10.82
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.
- package/dist/eslint/pasika/index.js +11 -0
- package/package.json +1 -1
|
@@ -386,6 +386,17 @@ function parseModule(file) {
|
|
|
386
386
|
names.add(node.name.text);
|
|
387
387
|
} else if (ts.isElementAccessExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === namespace && ts.isStringLiteral(node.argumentExpression)) {
|
|
388
388
|
names.add(node.argumentExpression.text);
|
|
389
|
+
} else if (ts.isVariableDeclaration(node) && ts.isObjectBindingPattern(node.name) && node.initializer && ts.isIdentifier(node.initializer) && node.initializer.text === namespace) {
|
|
390
|
+
for (const element of node.name.elements) {
|
|
391
|
+
if (element.dotDotDotToken) continue;
|
|
392
|
+
let importedName;
|
|
393
|
+
if (element.propertyName) {
|
|
394
|
+
importedName = propertyName(element.propertyName);
|
|
395
|
+
} else if (ts.isIdentifier(element.name)) {
|
|
396
|
+
importedName = element.name.text;
|
|
397
|
+
}
|
|
398
|
+
if (importedName) names.add(importedName);
|
|
399
|
+
}
|
|
389
400
|
}
|
|
390
401
|
ts.forEachChild(node, visit);
|
|
391
402
|
};
|