@@ -19,7 +19,7 @@ import {multilineArrayPrinter} from './printer/multiline-array-printer';
19
19
export * from './options' ;
20
20
export { pluginMarker } from './plugin-marker' ;
21
21
22
- const parsers : Record < string , Parser < any > > = mapObjectValues (
22
+ export const parsers : Record < string , Parser < any > > = mapObjectValues (
23
23
{
24
24
typescript : tsParsers . typescript ,
25
25
babel : babelParsers . babel ,
@@ -28,7 +28,7 @@ const parsers: Record<string, Parser<any>> = mapObjectValues(
28
28
json5 : babelParsers . json5 ,
29
29
} ,
30
30
( languageName , parserEntry ) => {
31
- return wrapParser ( parserEntry as any , languageName ) ;
31
+ return wrapParser ( parserEntry , languageName ) ;
32
32
} ,
33
33
) ;
34
34
@@ -37,7 +37,7 @@ const printers: Record<string, Printer<any>> = {
37
37
'estree-json' : multilineArrayPrinter ,
38
38
} ;
39
39
40
- const options : Record < keyof MultilineArrayOptions , SupportOption > = getObjectTypedKeys (
40
+ export const options : Record < keyof MultilineArrayOptions , SupportOption > = getObjectTypedKeys (
41
41
defaultMultilineArrayOptions ,
42
42
) . reduce (
43
43
( accum , key ) => {
@@ -49,46 +49,22 @@ const options: Record<keyof MultilineArrayOptions, SupportOption> = getObjectTyp
49
49
| 'boolean'
50
50
| 'int' ,
51
51
category : 'multilineArray' ,
52
- since : '0.0.1' ,
53
52
default : defaultValue as any ,
54
53
description : optionHelp [ key ] ,
55
- } as any ;
54
+ } ;
56
55
accum [ key ] = supportOption ;
57
56
return accum ;
58
57
} ,
59
58
{ } as Record < keyof MultilineArrayOptions , SupportOption > ,
60
59
) ;
61
60
62
- const defaultOptions : Partial < RequiredOptions > & Required < MultilineArrayOptions > =
61
+ export const defaultOptions : Partial < RequiredOptions > & Required < MultilineArrayOptions > =
63
62
defaultMultilineArrayOptions ;
64
63
65
- const languages = [
66
- {
67
- name : 'JavaScript' ,
68
- parsers : [
69
- 'babel' ,
70
- 'acorn' ,
71
- 'espree' ,
72
- 'meriyah' ,
73
- 'babel-flow' ,
74
- 'babel-ts' ,
75
- 'flow' ,
76
- 'typescript' ,
77
- ] ,
78
- } ,
79
- { name : 'TypeScript' , parsers : [ 'typescript' , 'babel-ts' ] } ,
80
- { name : 'JSON.stringify' , parsers : [ 'json-stringify' ] } ,
81
- { name : 'JSON' , parsers : [ 'json' ] } ,
82
- { name : 'JSON with Comments' , parsers : [ 'json' ] } ,
83
- { name : 'JSON5' , parsers : [ 'json5' ] } ,
84
- ] ;
85
-
64
+ /** Not actually exported: this is just for type checking purposes. */
86
65
const plugin : Plugin = {
87
66
options,
88
67
printers,
89
68
defaultOptions,
90
69
parsers,
91
- languages,
92
70
} ;
93
-
94
- export { defaultOptions , options , parsers } ;
0 commit comments