Adding optionalCatchBinding to plugins. (babel/babel-eslint#521)
This commit is contained in:
parent
b576677e9f
commit
04cf4246b8
@ -414,6 +414,7 @@ exports.parseNoPatch = function(code, options) {
|
|||||||
"importMeta",
|
"importMeta",
|
||||||
"classPrivateProperties",
|
"classPrivateProperties",
|
||||||
"bigInt",
|
"bigInt",
|
||||||
|
"optionalCatchBinding",
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1845,4 +1845,15 @@ describe("verify", () => {
|
|||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("works with optionalCatchBinding", () => {
|
||||||
|
verifyAndAssertMessages(
|
||||||
|
unpad(`
|
||||||
|
try {} catch {}
|
||||||
|
try {} catch {} finally {}
|
||||||
|
`),
|
||||||
|
{},
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user