File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,14 @@ import * as fs from 'fs';
12
12
import * as resolve from 'resolve' ;
13
13
import * as path from 'path' ;
14
14
import * as Ajv from 'ajv' ;
15
+ import * as jju from 'jju' ;
15
16
16
17
const ajv : Ajv . Ajv = new Ajv ( { verbose : true } ) ;
17
18
18
19
function initializeSchemaValidator ( ) : Ajv . ValidateFunction {
19
20
const jsonSchemaPath : string = resolve . sync ( '@microsoft/tsdoc/schemas/tsdoc.schema.json' , { basedir : __dirname } ) ;
20
21
const jsonSchemaContent : string = fs . readFileSync ( jsonSchemaPath ) . toString ( ) ;
21
- const jsonSchema : object = JSON . parse ( jsonSchemaContent ) ;
22
+ const jsonSchema : object = jju . parse ( jsonSchemaContent , { mode : 'cjson' } ) ;
22
23
return ajv . compile ( jsonSchema ) ;
23
24
}
24
25
@@ -139,7 +140,7 @@ export class TSDocConfigFile {
139
140
140
141
this . _fileNotFound = false ;
141
142
142
- const configJson : IConfigJson = JSON . parse ( configJsonContent ) ;
143
+ const configJson : IConfigJson = jju . parse ( configJsonContent , { mode : 'cjson' } ) ;
143
144
144
145
if ( configJson . $schema !== TSDocConfigFile . CURRENT_SCHEMA_URL ) {
145
146
this . _reportError ( {
You can’t perform that action at this time.
0 commit comments