Skip to content

Commit 5d66953

Browse files
authored
Sort babel plugins
1 parent 7e17203 commit 5d66953

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

src/parsers/parse_to_ast.js

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
11
import babelParser from '@babel/parser';
22
import 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
611
export 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-
3433
function getParserOpts(file) {
3534
return {
3635
allowImportExportEverywhere: true,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy