@@ -394,7 +394,7 @@ private void setupFilters() {
394394 for (FileType filetype : defaultExtract )
395395 for (String extension : filetype .getExtensions ()) patterns .add ("**/*" + extension );
396396
397- // include .eslintrc files, .xsaccess files, package.json files,
397+ // include .eslintrc files, .xsaccess files, package.json files,
398398 // tsconfig.json files, and codeql-javascript-*.json files
399399 patterns .add ("**/.eslintrc*" );
400400 patterns .add ("**/.xsaccess" );
@@ -895,7 +895,7 @@ protected DependencyInstallationResult preparePackagesAndDependencies(Set<Path>
895895 // For named packages, find the main file.
896896 String name = packageJson .getName ();
897897 if (name != null ) {
898- Path entryPoint = null ;
898+ Path entryPoint = null ;
899899 try {
900900 entryPoint = guessPackageMainFile (path , packageJson , FileType .TYPESCRIPT .getExtensions ());
901901 if (entryPoint == null ) {
@@ -1108,6 +1108,10 @@ private boolean hasTypeScriptFiles(Set<Path> filesToExtract) {
11081108 return false ;
11091109 }
11101110
1111+ public static boolean treatAsTSConfig (String basename ) {
1112+ return basename .contains ("tsconfig." ) && basename .endsWith (".json" );
1113+ }
1114+
11111115 private void findFilesToExtract (
11121116 FileExtractor extractor , final Set <Path > filesToExtract , final List <Path > tsconfigFiles )
11131117 throws IOException {
@@ -1140,7 +1144,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
11401144
11411145 // extract TypeScript projects from 'tsconfig.json'
11421146 if (typeScriptMode == TypeScriptMode .FULL
1143- && file .getFileName ().endsWith ( "tsconfig.json" )
1147+ && treatAsTSConfig ( file .getFileName ().toString () )
11441148 && !excludes .contains (file )
11451149 && isFileIncluded (file )) {
11461150 tsconfigFiles .add (file );
0 commit comments