77 */
88
99import axios from 'axios' ;
10- import { resolve } from 'path' ;
11- import { writeFileSync } from 'fs' ;
10+ import { resolve } from 'path' ;
11+ import { writeFileSync } from 'fs' ;
1212
1313async function main ( ) {
1414 /** schemastore definition */
@@ -26,27 +26,34 @@ async function main() {
2626 properties : {
2727 'ts-node' : {
2828 ...typescriptNodeSchema . definitions . TsConfigOptions ,
29- description : typescriptNodeSchema . definitions . TsConfigSchema . properties [ 'ts-node' ] . description ,
29+ description :
30+ typescriptNodeSchema . definitions . TsConfigSchema . properties [
31+ 'ts-node'
32+ ] . description ,
3033 properties : {
3134 ...typescriptNodeSchema . definitions . TsConfigOptions . properties ,
3235 compilerOptions : {
33- ...typescriptNodeSchema . definitions . TsConfigOptions . properties . compilerOptions ,
34- allOf : [ {
35- $ref : '#/definitions/compilerOptionsDefinition/properties/compilerOptions'
36- } ]
37- }
38- }
39- }
40- }
36+ ...typescriptNodeSchema . definitions . TsConfigOptions . properties
37+ . compilerOptions ,
38+ allOf : [
39+ {
40+ $ref :
41+ '#/definitions/compilerOptionsDefinition/properties/compilerOptions' ,
42+ } ,
43+ ] ,
44+ } ,
45+ } ,
46+ } ,
47+ } ,
4148 } ,
4249 } ,
4350 allOf : [
4451 // Splice into the allOf array at a spot that looks good. Does not affect
4552 // behavior of the schema, but looks nicer if we want to submit as a PR to schemastore.
4653 ...schemastoreSchema . allOf . slice ( 0 , 4 ) ,
47- { " $ref" : " #/definitions/tsNodeDefinition" } ,
54+ { $ref : ' #/definitions/tsNodeDefinition' } ,
4855 ...schemastoreSchema . allOf . slice ( 4 ) ,
49- ]
56+ ] ,
5057 } ;
5158 writeFileSync (
5259 resolve ( __dirname , '../tsconfig.schemastore-schema.json' ) ,
@@ -55,9 +62,11 @@ async function main() {
5562}
5663
5764export async function getSchemastoreSchema ( ) {
58- const { data : schemastoreSchema } = await axios . get (
65+ const {
66+ data : schemastoreSchema ,
67+ } = await axios . get (
5968 'https://schemastore.azurewebsites.net/schemas/json/tsconfig.json' ,
60- { responseType : " json" }
69+ { responseType : ' json' }
6170 ) ;
6271 return schemastoreSchema ;
6372}
0 commit comments