@@ -25,8 +25,14 @@ namespace ts.server {
25
25
return ( ( 1e9 * seconds ) + nanoseconds ) / 1000000.0 ;
26
26
}
27
27
28
- function shouldSkipSematicCheck ( project : Project ) {
29
- return ( project . projectKind === ProjectKind . Inferred || project . projectKind === ProjectKind . External ) && project . isJsOnlyProject ( ) ;
28
+ function shouldSkipSemanticCheck ( project : Project ) {
29
+ if ( project . projectKind === ProjectKind . Inferred || project . projectKind === ProjectKind . External ) {
30
+ return project . isJsOnlyProject ( ) ;
31
+ }
32
+ else {
33
+ // For configured projects, require that skipLibCheck be set also
34
+ return project . getCompilerOptions ( ) . skipLibCheck && project . isJsOnlyProject ( ) ;
35
+ }
30
36
}
31
37
32
38
interface FileStart {
@@ -447,7 +453,7 @@ namespace ts.server {
447
453
private semanticCheck ( file : NormalizedPath , project : Project ) {
448
454
try {
449
455
let diags : Diagnostic [ ] = [ ] ;
450
- if ( ! shouldSkipSematicCheck ( project ) ) {
456
+ if ( ! shouldSkipSemanticCheck ( project ) ) {
451
457
diags = project . getLanguageService ( ) . getSemanticDiagnostics ( file ) ;
452
458
}
453
459
@@ -555,7 +561,7 @@ namespace ts.server {
555
561
556
562
private getDiagnosticsWorker ( args : protocol . FileRequestArgs , isSemantic : boolean , selector : ( project : Project , file : string ) => Diagnostic [ ] , includeLinePosition : boolean ) {
557
563
const { project, file } = this . getFileAndProject ( args ) ;
558
- if ( isSemantic && shouldSkipSematicCheck ( project ) ) {
564
+ if ( isSemantic && shouldSkipSemanticCheck ( project ) ) {
559
565
return [ ] ;
560
566
}
561
567
const scriptInfo = project . getScriptInfoForNormalizedPath ( file ) ;
0 commit comments