File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1079,6 +1079,12 @@ namespace ts.server {
10791079 project ,
10801080 fileName => this . onConfigFileAddedForInferredProject ( fileName ) ) ;
10811081
1082+ if ( root . scriptKind === ScriptKind . JS || root . scriptKind === ScriptKind . JSX ) {
1083+ const options = project . getCompilerOptions ( ) ;
1084+ options . maxNodeModuleJsDepth = 2 ;
1085+ project . setCompilerOptions ( options ) ;
1086+ }
1087+
10821088 project . updateGraph ( ) ;
10831089
10841090 if ( ! useExistingProject ) {
Original file line number Diff line number Diff line change @@ -169,13 +169,6 @@ namespace ts.server {
169169 this . compilerOptions . allowNonTsExtensions = true ;
170170 }
171171
172- if ( this . projectKind === ProjectKind . Inferred ) {
173- // Add default compiler options for inferred projects here
174- if ( this . compilerOptions . maxNodeModuleJsDepth === undefined ) {
175- this . compilerOptions . maxNodeModuleJsDepth = 2 ;
176- }
177- }
178-
179172 this . setInternalCompilerOptionsForEmittingJsFiles ( ) ;
180173
181174 this . lsHost = new LSHost ( this . projectService . host , this , this . projectService . cancellationToken ) ;
You can’t perform that action at this time.
0 commit comments