Don't enable class features by default in estree (#12867)

* Don't enable class features by default in `estree`

* Flow

* Reduce breakage
This commit is contained in:
Nicolò Ribaudo
2021-02-23 11:30:01 +01:00
committed by GitHub
parent a2114d452c
commit c30039029a
17 changed files with 351 additions and 17 deletions

View File

@@ -31,7 +31,10 @@ export function normalizeBabelParseConfig(options) {
allowReturnOutsideFunction: true,
allowSuperOutsideMethod: true,
...options.babelOptions.parserOpts,
plugins: ["estree", ...(options.babelOptions.parserOpts?.plugins ?? [])],
plugins: [
["estree", { classFeatures: false }],
...(options.babelOptions.parserOpts?.plugins ?? []),
],
ranges: true,
tokens: true,
},