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