Skip to content

Commit

Permalink
[babel 8] chore: do not push objectRestSpread parser option (babel#…
Browse files Browse the repository at this point in the history
…12607)

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
  • Loading branch information
JLHwung and nicolo-ribaudo committed Jan 12, 2021
1 parent cba64f9 commit e004a91
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/babel-plugin-syntax-typescript/src/index.js
Expand Up @@ -31,12 +31,12 @@ export default declare((api, { isTSX }) => {
// in TS depends on the extensions, and is purely dependent on 'isTSX'.
removePlugin(plugins, "jsx");

parserOpts.plugins.push(
"typescript",
"classProperties",
// TODO: This is enabled by default now, remove in Babel 8
"objectRestSpread",
);
parserOpts.plugins.push("typescript", "classProperties");

if (!process.env.BABEL_8_BREAKING) {
// This is enabled by default since @babel/parser 7.1.5
parserOpts.plugins.push("objectRestSpread");
}

if (isTSX) {
parserOpts.plugins.push("jsx");
Expand Down

0 comments on commit e004a91

Please sign in to comment.