Check for duplicate named exports in exported rest elements/properties (#164)

This commit is contained in:
Kai Cataldo
2016-10-10 10:10:16 -04:00
committed by Henry Zhu
parent 2697bfd820
commit 7dd45f7465
19 changed files with 61 additions and 0 deletions

View File

@@ -947,6 +947,8 @@ pp.checkDeclaration = function(node) {
}
} else if (node.type === "ObjectProperty") {
this.checkDeclaration(node.value);
} else if (node.type === "RestElement" || node.type === "RestProperty") {
this.checkDeclaration(node.argument);
} else if (node.type === "Identifier") {
this.checkDuplicateExports(node, node.name);
}