File tree Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -481,6 +481,12 @@ namespace ts {
481
481
name : "plugin" ,
482
482
type : "object"
483
483
}
484
+ } ,
485
+ {
486
+ name : "checkJsFiles" ,
487
+ type : "boolean" ,
488
+ experimental : true ,
489
+ description : Diagnostics . Report_errors_in_js_files
484
490
}
485
491
] ;
486
492
Original file line number Diff line number Diff line change 3362
3362
"Octal literals are not allowed in enums members initializer. Use the syntax '{0}'." : {
3363
3363
"category" : " Error" ,
3364
3364
"code" : 8018
3365
+ },
3366
+ "Report errors in .js files." : {
3367
+ "category" : " Message" ,
3368
+ "code" : 8019
3365
3369
}
3366
3370
}
Original file line number Diff line number Diff line change @@ -907,7 +907,7 @@ namespace ts {
907
907
// For JavaScript files, we don't want to report semantic errors.
908
908
// Instead, we'll report errors for using TypeScript-only constructs from within a
909
909
// JavaScript file when we get syntactic diagnostics for the file.
910
- const checkDiagnostics = isSourceFileJavaScript ( sourceFile ) ? [ ] : typeChecker . getDiagnostics ( sourceFile , cancellationToken ) ;
910
+ const checkDiagnostics = ! options . checkJsFiles && isSourceFileJavaScript ( sourceFile ) ? [ ] : typeChecker . getDiagnostics ( sourceFile , cancellationToken ) ;
911
911
const fileProcessingDiagnosticsInFile = fileProcessingDiagnostics . getDiagnostics ( sourceFile . fileName ) ;
912
912
const programDiagnosticsInFile = programDiagnostics . getDiagnostics ( sourceFile . fileName ) ;
913
913
Original file line number Diff line number Diff line change 3312
3312
alwaysStrict ?: boolean ; // Always combine with strict property
3313
3313
baseUrl ?: string ;
3314
3314
charset ?: string ;
3315
+ checkJsFiles ?: boolean ;
3315
3316
/* @internal */ configFilePath ?: string ;
3316
3317
declaration ?: boolean ;
3317
3318
declarationDir ?: string ;
You can’t perform that action at this time.
0 commit comments