File tree Expand file tree Collapse file tree 1 file changed +17
-18
lines changed Expand file tree Collapse file tree 1 file changed +17
-18
lines changed Original file line number Diff line number Diff line change 11import babelParser from '@babel/parser' ;
22import path from 'path' ;
33
4+ const TYPESCRIPT_EXTS = {
5+ '.ts' : [ 'typescript' ] ,
6+ '.tsx' : [ 'typescript' , 'jsx' ]
7+ } ;
8+
49// this list is roughly the same as the one in prettier
510// https://github.com/prettier/prettier/blob/24d39a906834cf449304dc684b280a5ca9a0a6d7/src/language-js/parser-babel.js#L23
611export const standardBabelParserPlugins = [
7- 'doExpressions' ,
12+ 'classPrivateMethods' ,
13+ 'classPrivateProperties' ,
814 'classProperties' ,
15+ 'classStaticBlock' ,
16+ 'decimal' ,
17+ [ 'decorators' , { decoratorsBeforeExport : false } ] ,
18+ 'doExpressions' ,
919 'exportDefaultFrom' ,
1020 'functionBind' ,
1121 'functionSent' ,
12- 'classPrivateProperties' ,
13- 'throwExpressions' ,
14- 'classPrivateMethods' ,
15- 'v8intrinsic' ,
22+ 'importAssertions' ,
23+ 'moduleBlocks' ,
24+ 'moduleStringNames' ,
1625 'partialApplication' ,
17- [ 'decorators ' , { decoratorsBeforeExport : false } ] ,
26+ [ 'pipelineOperator ' , { proposal : 'minimal' } ] ,
1827 'privateIn' ,
19- 'importAssertions' ,
2028 [ 'recordAndTuple' , { syntaxType : 'hash' } ] ,
21- 'decimal' ,
22- 'moduleStringNames' ,
23- 'classStaticBlock' ,
24- 'moduleBlocks' ,
25-
26- [ 'pipelineOperator' , { proposal : 'minimal' } ]
29+ 'throwExpressions' ,
30+ 'v8intrinsic'
2731] ;
2832
29- const TYPESCRIPT_EXTS = {
30- '.ts' : [ 'typescript' ] ,
31- '.tsx' : [ 'typescript' , 'jsx' ]
32- } ;
33-
3433function getParserOpts ( file ) {
3534 return {
3635 allowImportExportEverywhere : true ,
You can’t perform that action at this time.
0 commit comments