diff --git a/lib/6to5/transformation/transform.js b/lib/6to5/transformation/transform.js index e78a0ea3b1..bf647e1f69 100644 --- a/lib/6to5/transformation/transform.js +++ b/lib/6to5/transformation/transform.js @@ -42,7 +42,6 @@ _.each({ // spec specBlockHoistFunctions: require("./transformers/spec-block-hoist-functions"), specNoForInOfAssignment: require("./transformers/spec-no-for-in-of-assignment"), - specNoDuplicateProperties: require("./transformers/spec-no-duplicate-properties"), // playground methodBinding: require("./transformers/playground-method-binding"), diff --git a/lib/6to5/transformation/transformers/spec-no-duplicate-properties.js b/lib/6to5/transformation/transformers/spec-no-duplicate-properties.js deleted file mode 100644 index 6c7e93e761..0000000000 --- a/lib/6to5/transformation/transformers/spec-no-duplicate-properties.js +++ /dev/null @@ -1,25 +0,0 @@ -var t = require("../../types"); - -exports.ObjectExpression = function (node, parent, file) { - var keys = []; - - for (var i in node.properties) { - var prop = node.properties[i]; - if (prop.computed || prop.kind !== "init") continue; - - var key = prop.key; - if (t.isIdentifier(key)) { - key = key.name; - } else if (t.isLiteral(key)) { - key = key.value; - } else { - continue; - } - - if (keys.indexOf(key) >= 0) { - throw file.errorWithNode(prop.key, "Duplicate property key"); - } else { - keys.push(key); - } - } -};