Adding optionalCatchBinding to plugins. (babel/babel-eslint#521)

This commit is contained in:
Jordan Gensler 2017-09-26 13:17:44 -07:00
parent b576677e9f
commit 04cf4246b8
2 changed files with 12 additions and 0 deletions

View File

@ -414,6 +414,7 @@ exports.parseNoPatch = function(code, options) {
"importMeta", "importMeta",
"classPrivateProperties", "classPrivateProperties",
"bigInt", "bigInt",
"optionalCatchBinding",
], ],
}; };

View File

@ -1845,4 +1845,15 @@ describe("verify", () => {
[] []
); );
}); });
it("works with optionalCatchBinding", () => {
verifyAndAssertMessages(
unpad(`
try {} catch {}
try {} catch {} finally {}
`),
{},
[]
);
});
}); });