diff --git a/src/babel/messages.js b/src/babel/messages.js index 94d65217ba..98e136daff 100644 --- a/src/babel/messages.js +++ b/src/babel/messages.js @@ -18,7 +18,6 @@ export const MESSAGES = { modulesIllegalExportName: "Illegal export $1", unknownForHead: "Unknown node type $1 in ForStatement", didYouMean: "Did you mean $1?", - evalInStrictMode: "eval is not allowed in strict mode", codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.", missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues", unsupportedOutputType: "Unsupported output type $1", diff --git a/src/babel/transformation/transformers/other/strict.js b/src/babel/transformation/transformers/other/strict.js index 1889800b11..b227250600 100644 --- a/src/babel/transformation/transformers/other/strict.js +++ b/src/babel/transformation/transformers/other/strict.js @@ -29,9 +29,3 @@ export function ThisExpression() { return t.identifier("undefined"); } } - -export function CallExpression(node, parent, scope, file) { - if (t.isIdentifier(node.callee, { name: "eval" })) { - throw file.errorWithNode(node, messages.get("evalInStrictMode")); - } -}