Skip to content

Commit

Permalink
Adding optionalCatchBinding to plugins. (babel/babel-eslint#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
kesne committed Sep 26, 2017
1 parent b576677 commit 04cf424
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions eslint/babel-eslint-parser/index.js
Expand Up @@ -414,6 +414,7 @@ exports.parseNoPatch = function(code, options) {
"importMeta",
"classPrivateProperties",
"bigInt",
"optionalCatchBinding",
],
};

Expand Down
11 changes: 11 additions & 0 deletions eslint/babel-eslint-parser/test/non-regression.js
Expand Up @@ -1845,4 +1845,15 @@ describe("verify", () => {
[]
);
});

it("works with optionalCatchBinding", () => {
verifyAndAssertMessages(
unpad(`
try {} catch {}
try {} catch {} finally {}
`),
{},
[]
);
});
});

0 comments on commit 04cf424

Please sign in to comment.