better destructuring AssignmentExpression error message
This commit is contained in:
parent
349eba33ce
commit
0917a6a5b1
@ -149,7 +149,7 @@ exports.ExpressionStatement = function (node, parent, file, scope) {
|
||||
exports.AssignmentExpression = function (node, parent, file) {
|
||||
if (parent.type === "ExpressionStatement") return;
|
||||
if (!t.isPattern(node.left)) return;
|
||||
throw file.errorWithNode(node, "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current limitations");
|
||||
throw file.errorWithNode(node, "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current 6to5 limitations");
|
||||
};
|
||||
|
||||
exports.VariableDeclaration = function (node, parent, file, scope) {
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current limitations"
|
||||
"throws": "AssignmentExpression destructuring outside of a ExpressionStatement is forbidden due to current 6to5 limitations"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user