-
Notifications
You must be signed in to change notification settings - Fork 0
/
$schema.json
676 lines (661 loc) · 27.1 KB
/
$schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
{
"title": "JSON schema for the .bundrc configuration file",
"directories": {
"type": "object",
"properties": {
"name": {
"description": "Project name",
"type": "string",
"maxLength": 214,
"minLength": 1,
"pattern": "^(?:@[a-z0-9-*~][a-z0-9-*._~]*/)?[a-z0-9-~][a-z0-9-._~]*$"
},
"version": {
"description": "Project version",
"type": "string"
},
"bin": {
"description": "If you specify a 'bin' directory, then all the files in that folder will be used as the 'bin' hash.",
"type": "string"
},
"doc": {
"description": "Put markdown files in here. Eventually, these will be displayed nicely, maybe, someday.",
"type": "string"
},
"example": {
"description": "Put example scripts in here. Someday, it might be exposed in some clever way.",
"type": "string"
},
"lib": {
"description": "Tell people where the bulk of your library is. Nothing special is done with the lib folder in any way, but it's useful meta info.",
"type": "string"
},
"man": {
"description": "A folder that is full of man pages. Sugar to generate a 'man' array by walking the folder.",
"type": "string"
},
"test": {
"type": "string"
}
}
},
"definitions": {
"nameDefinition": {
"properties": {
"name": {
"description": "A string hols project name in .bundrc config file",
"type": "string"
}
}
},
"versionDefinition": {
"properties": {
"version": {
"description": "Major, minor and patch version numbers of the project e.g. 1.0.0 in .bundrc config file",
"type": "string"
}
}
},
"personDefinition": {
"description": "A person who has been involved in creating or maintaining this project.",
"type": ["object", "string"],
"required": ["name"],
"properties": {
"name": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"email": {
"type": "string",
"format": "email"
}
}
},
"binDefinition": {
"properties": {
"bin": {
"description": "If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included.",
"type": "array",
"items": {
"type": "string"
}
}
},
"not": {
"required": ["exclude"]
}
},
"filesDefinition": {
"properties": {
"files": {
"description": "If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included.",
"type": "array",
"items": {
"type": "string"
}
}
},
"not": {
"required": ["exclude"]
}
},
"excludeDefinition": {
"properties": {
"exclude": {
"description": "Specifies a list of files to be excluded from compilation. The 'exclude' property only affects the files included via the 'include' property and not the 'files' property. Glob patterns require TypeScript version 2.0 or later.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"includeDefinition": {
"properties": {
"include": {
"description": "Specifies a list of glob patterns that match files to be included in compilation. If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. Requires TypeScript version 2.0 or later.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"compileOnSaveDefinition": {
"properties": {
"compileOnSave": {
"description": "Enable Compile-on-Save for this project.",
"type": "boolean"
}
}
},
"extendsDefinition": {
"properties": {
"extends": {
"description": "Path to base configuration file to inherit from. Requires TypeScript version 2.1 or later.",
"type": "string"
}
}
},
"compilerOptionsDefinition": {
"properties": {
"compilerOptions": {
"type": "object",
"description": "Instructs the JavaScript language service how to validate and down level compile .js files.",
"properties": {
"charset": {
"description": "The character set of the input files.",
"type": "string"
},
"declaration": {
"description": "Generates corresponding d.ts files.",
"type": "boolean"
},
"declarationDir": {
"type": "string",
"description": "Specify output directory for generated declaration files. Requires TypeScript version 2.0 or later."
},
"diagnostics": {
"description": "When down-level compiling, show diagnostic information.",
"type": "boolean"
},
"emitBOM": {
"description": "When down-level compiling, emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.",
"type": "boolean"
},
"emitDeclarationOnly": {
"description": "Only emit '.d.ts' declaration files.",
"type": "boolean"
},
"inlineSourceMap": {
"description": "When down-level compiling, emit a single file with source maps instead of having a separate file.",
"type": "boolean"
},
"inlineSources": {
"description": "When down-level compiling, emit the source alongside the sourcemaps within a single file; requires --inlineSourceMap to be set.",
"type": "boolean"
},
"jsx": {
"description": "When down-level compiling, specify JSX code generation: 'preserve', 'react', or 'react-native'.",
"enum": ["preserve", "react", "react-native"]
},
"reactNamespace": {
"description": "When down-level compiling, specifies the object invoked for createElement and __spread when targeting 'react' JSX emit.",
"type": "string"
},
"jsxFactory": {
"description": "Specify the JSX factory function to use when targeting react JSX emit, e.g. 'React.createElement' or 'h'. Requires TypeScript version 2.1 or later.",
"type": "string",
"default": "React.createElement"
},
"jsxFragmentFactory": {
"description": "Specify the JSX Fragment reference to use for fragements when targeting react JSX emit, e.g. 'React.Fragment' or 'Fragment'. Requires TypeScript version 4.0 or later.",
"type": "string",
"default": "React.Fragment"
},
"listFiles": {
"description": "When down-level compiling, print names of files part of the compilation.",
"type": "boolean"
},
"mapRoot": {
"description": "When down-level compiling, specifies the location where debugger should locate map files instead of generated locations.",
"type": "string"
},
"module": {
"description": "When down-level compiling, specify module code generation: 'none', 'commonJS', 'amd', 'system', 'umd', 'es2015', 'es2020' or 'esnext'.",
"type": "string",
"anyOf": [
{
"enum": [
"commonJS",
"amd",
"umd",
"system",
"es6",
"es2015",
"es2020",
"esnext",
"none"
]
},
{
"pattern": "^([Cc][Oo][Mm][Mm][Oo][Nn][Jj][Ss]|[AaUu][Mm][Dd]|[Ss][Yy][Ss][Tt][Ee][Mm]|[Ee][Ss]([356]|201[567]|2020|[Nn][Ee][Xx][Tt])|[Nn][Oo][Nn][Ee])$"
}
]
},
"moduleResolution": {
"description": "Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6) .",
"type": "string",
"anyOf": [
{
"enum": ["classic", "node"]
},
{
"pattern": "^(([Nn]ode)|([Cc]lassic))$"
}
],
"default": "classic"
},
"newLine": {
"description": "When down-level compiling, specifies the end of line sequence to be used when emitting files: 'crlf' (Windows) or 'lf' (Unix).",
"type": "string",
"anyOf": [
{
"enum": ["crlf", "lf"]
},
{
"pattern": "^(CRLF|LF|crlf|lf)$"
}
]
},
"noEmit": {
"description": "When down-level compiling, do not emit output.",
"type": "boolean"
},
"noEmitHelpers": {
"description": "When down-level compiling, do not generate custom helper functions like __extends in compiled output.",
"type": "boolean"
},
"noEmitOnError": {
"description": "When down-level compiling, do not emit outputs if any type checking errors were reported.",
"type": "boolean"
},
"noImplicitAny": {
"description": "Warn on expressions and declarations with an implied 'any' type.",
"type": "boolean"
},
"noImplicitThis": {
"description": "Raise error on 'this' expressions with an implied any type.",
"type": "boolean"
},
"noUnusedLocals": {
"description": "Report errors on unused locals. Requires TypeScript version 2.0 or later.",
"type": "boolean"
},
"noUnusedParameters": {
"description": "Report errors on unused parameters. Requires TypeScript version 2.0 or later.",
"type": "boolean"
},
"noLib": {
"description": "Do not include the default library file (lib.d.ts).",
"type": "boolean"
},
"noResolve": {
"description": "When down-level compiling, do not add triple-slash references or module import targets to the list of compiled files.",
"type": "boolean"
},
"skipDefaultLibCheck": {
"description": "Do not check for the default library (lib.d.ts).",
"type": "boolean"
},
"skipLibCheck": {
"description": "Do not check declaration files. Requires TypeScript version 2.0 or later.",
"type": "boolean"
},
"outFile": {
"description": "When down-level compiling, concatenate and emit output to single file.",
"type": "string"
},
"outDir": {
"description": "When down-level compiling, redirect output structure to the directory.",
"type": "string"
},
"pretty": {
"description": "When down-level compiling, stylize errors and messages using color and context (experimental).",
"type": "boolean"
},
"removeComments": {
"description": "When down-level compiling, do not emit comments to output.",
"type": "boolean"
},
"rootDir": {
"description": "When down-level compiling, specifies the root directory of input files. Use to control the output directory structure with --outDir.",
"type": "string"
},
"isolatedModules": {
"description": "When down-level compiling, unconditionally emit imports for unresolved files.",
"type": "boolean"
},
"sourceMap": {
"description": "When down-level compiling, generates corresponding '.map' file.",
"type": "boolean"
},
"sourceRoot": {
"description": "When down-level compiling, specifies the location where debugger should locate JavaScript files instead of source locations.",
"type": "string"
},
"suppressExcessPropertyErrors": {
"description": "Suppress excess property checks for object literals.",
"type": "boolean"
},
"suppressImplicitAnyIndexErrors": {
"description": "Suppress noImplicitAny errors for indexing objects lacking index signatures.",
"type": "boolean"
},
"stripInternal": {
"description": "When down-level compiling, do not emit declarations for code that has an '@internal' annotation.",
"type": "boolean"
},
"target": {
"description": "Specify ECMAScript target version. Permitted values are 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020' or 'esnext'.",
"type": "string",
"default": "es2015",
"anyOf": [
{
"enum": [
"es3",
"es5",
"es6",
"es2015",
"es2016",
"es2017",
"es2018",
"es2019",
"es2020",
"esnext"
]
},
{
"pattern": "^([Ee][Ss]([356]|(20(1[56789]|20))|[Nn][Ee][Xx][Tt]))$"
}
]
},
"watch": {
"description": "When down-level compiling, watch input files.",
"type": "boolean"
},
"experimentalDecorators": {
"description": "Enables experimental support for ES7 decorators.",
"type": "boolean"
},
"emitDecoratorMetadata": {
"description": "When down-level compiling, emit design-type metadata for decorated declarations in source.",
"type": "boolean"
},
"allowUnusedLabels": {
"description": "Do not report errors on unused labels.",
"type": "boolean"
},
"noImplicitReturns": {
"description": "Report error when not all code paths in function return a value.",
"type": "boolean"
},
"noFallthroughCasesInSwitch": {
"description": "Report errors for fallthrough cases in switch statement.",
"type": "boolean"
},
"allowUnreachableCode": {
"description": "Do not report errors on unreachable code.",
"type": "boolean"
},
"forceConsistentCasingInFileNames": {
"description": "Disallow inconsistently-cased references to the same file.",
"type": "boolean"
},
"baseUrl": {
"description": "Base directory to resolve non-relative module names.",
"type": "string"
},
"paths": {
"description": "Specify path mapping to be computed relative to baseUrl option.",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string",
"description": "Path mapping to be computed relative to baseUrl option."
}
}
},
"rootDirs": {
"description": "Specify list of root directory to be used when resolving modules.",
"type": "array",
"items": {
"type": "string"
}
},
"allowSyntheticDefaultImports": {
"description": "Allow default imports from modules with no default export. This does not affect code emit, just typechecking.",
"type": "boolean"
},
"noImplicitUseStrict": {
"description": "When down-level compiling, do not emit 'use strict' directives in module output.",
"type": "boolean"
},
"listEmittedFiles": {
"description": "When down-level compiling, enable to list all emitted files. Requires TypeScript version 2.0 or later.",
"type": "boolean"
},
"disableSizeLimit": {
"description": "Disable size limit for JavaScript project. Requires TypeScript version 2.0 or later.",
"type": "boolean",
"default": false
},
"lib": {
"description": "Specify library file to be included in the compilation. Requires TypeScript version 2.0 or later.",
"type": "array",
"items": {
"type": "string",
"anyOf": [
{
"enum": [
"es5",
"es6",
"es7",
"es2015",
"es2015.collection",
"es2015.core",
"es2015.generator",
"es2015.iterable",
"es2015.promise",
"es2015.proxy",
"es2015.reflect",
"es2015.symbol.wellknown",
"es2015.symbol",
"es2016",
"es2016.array.include",
"es2017",
"es2017.intl",
"es2017.object",
"es2017.sharedmemory",
"es2017.string",
"es2017.typedarrays",
"es2018",
"es2018.asynciterable",
"es2018.intl",
"es2018.promise",
"es2018.regexp",
"es2019",
"es2019.array",
"es2019.object",
"es2019.string",
"es2019.symbol",
"es2020",
"es2020.bigint",
"es2020.promise",
"es2020.string",
"es2020.symbol.wellknown",
"esnext",
"esnext.array",
"esnext.asynciterable",
"esnext.bigint",
"esnext.intl",
"esnext.symbol",
"dom",
"dom.iterable",
"scripthost",
"webworker",
"webworker.importscripts"
]
},
{
"pattern": "^[Ee][Ss]5|[Ee][Ss]6|[Ee][Ss]7$"
},
{
"pattern": "^[Ee][Ss]2015(\\.([Cc][Oo][Ll][Ll][Ee][Cc][Tt][Ii][Oo][Nn]|[Cc][Oo][Rr][Ee]|[Gg][Ee][Nn][Ee][Rr][Aa][Tt][Oo][Rr]|[Ii][Tt][Ee][Rr][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Rr][Aa][Bb][Ll][Ee]|[Bb][Ii][Gg][Ii][Nn][Tt]|[Ii][Nn][Tt][Ll]|[Ss][Yy][Mm][Bb][Oo][Ll]))?$"
},
{
"pattern": "^[Dd][Oo][Mm](\\.[Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee])?$"
},
{
"pattern": "^[Ss][Cc][Rr][Ii][Pp][Tt][Hh][Oo][Ss][Tt]$"
},
{
"pattern": "^[Ww][Ee][Bb][Ww][Oo][Rr][Kk][Ee][Rr](\\.[Ii][Mm][Pp][Oo][Rr][Tt][Ss][Cc][Rr][Ii][Pp][Tt][Ss])?$"
}
]
}
},
"strictNullChecks": {
"description": "Enable strict null checks. Requires TypeScript version 2.0 or later.",
"type": "boolean"
},
"maxNodeModuleJsDepth": {
"description": "The maximum dependency depth to search under node_modules and load JavaScript files.",
"type": "number",
"default": 2
},
"alwaysStrict": {
"description": "Parse in strict mode and emit 'use strict' for each source file. Requires TypeScript version 2.1 or later.",
"type": "boolean"
},
"strict": {
"description": "Enable all strict type checking options. Requires TypeScript version 2.3 or later.",
"type": "boolean"
},
"strictBindCallApply": {
"description": "Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.",
"type": "boolean"
},
"checkJs": {
"description": "Report errors in .js files.",
"type": "boolean"
},
"strictFunctionTypes": {
"description": "Disable bivariant parameter checking for function types. Requires TypeScript version 2.6 or later.",
"type": "boolean"
},
"strictPropertyInitialization": {
"description": "Ensure non-undefined class properties are initialized in the constructor. Requires TypeScript version 2.7 or later.",
"type": "boolean"
},
"esModuleInterop": {
"description": "Emit '__importStar' and '__importDefault' helpers for runtime babel ecosystem compatibility and enable '--allowSyntheticDefaultImports' for typesystem compatibility. Requires TypeScript version 2.7 or later.",
"type": "boolean"
},
"allowUmdGlobalAccess": {
"description": "Allow accessing UMD globals from modules.",
"type": "boolean"
},
"keyofStringsOnly": {
"description": "Resolve 'keyof' to string valued property names only (no numbers or symbols). Requires TypeScript version 2.9 or later.",
"type": "boolean"
},
"useDefineForClassFields": {
"description": "Emit ECMAScript standard class fields. Requires TypeScript version 3.7 or later.",
"type": "boolean"
},
"declarationMap": {
"description": "Generates a sourcemap for each corresponding '.d.ts' file. Requires TypeScript version 2.9 or later.",
"type": "boolean"
},
"resolveJsonModule": {
"description": "Include modules imported with '.json' extension. Requires TypeScript version 2.9 or later.",
"type": "boolean"
},
"plugins": {
"description": "List of TypeScript language server plugins to load. Requires TypeScript version 2.3 or later.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Plugin name.",
"type": "string"
}
}
}
},
"assumeChangesOnlyAffectDirectDependencies": {
"description": "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.",
"type": "boolean"
}
},
"additionalProperties": false
}
}
},
"typeAcquisitionDefinition": {
"properties": {
"typeAcquisition": {
"type": "object",
"description": "Auto type (.d.ts) acquisition options for this project. Requires TypeScript version 2.1 or later.",
"properties": {
"enable": {
"description": "Enable auto type acquisition",
"type": "boolean",
"default": true
},
"include": {
"description": "Specifies a list of type declarations to be included in auto type acquisition. Ex. [\"jquery\", \"lodash\"]",
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"description": "Specifies a list of type declarations to be excluded from auto type acquisition. Ex. [\"jquery\", \"lodash\"]",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"properties": {
"author": {
"$ref": "#/definitions/personDefinition"
}
},
"type": "object",
"allOf": [
{ "$ref": "#/definitions/compilerOptionsDefinition" },
{ "$ref": "#/definitions/compileOnSaveDefinition" },
{ "$ref": "#/definitions/typeAcquisitionDefinition" },
{ "$ref": "#/definitions/extendsDefinition" },
{
"anyOf": [
{ "$ref": "#/definitions/nameDefinition" },
{ "$ref": "#/definitions/versionDefinition" },
{ "$ref": "#/definitions/binDefinition" },
{ "$ref": "#/definitions/filesDefinition" },
{ "$ref": "#/definitions/excludeDefinition" },
{ "$ref": "#/definitions/includeDefinition" }
]
}
]
}