Re-add optional chaining delete (#7257)

* Re-add optional chaining delete

* Move exec tests next to output tests

* Forgot to commit these
This commit is contained in:
Justin Ridgewell
2018-01-24 11:26:02 -08:00
committed by GitHub
parent 63d9998aa4
commit ca18ea5e79
12 changed files with 122 additions and 63 deletions

View File

@@ -113,6 +113,12 @@ export default function(api, options) {
if (path.key == "callee" && parentPath.isCallExpression()) {
return false;
}
if (
path.key == "argument" &&
parentPath.isUnaryExpression({ operator: "delete" })
) {
return false;
}
return true;
});