Skip to content

Commit 2093cdd

Browse files
committed
Stop indexing JS with --inferTSConfig
This behavior was dramatically slowing down the indexing of npm package repos for questionable value. If the user wants to index JS code then they can add that config to their `tsconfig.json` file. This flag was added specifically for npm package repos.
1 parent f5192a2 commit 2093cdd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,7 @@ export function index(options: Options): void {
157157
}
158158
if (!ts.sys.fileExists(tsconfigFileName)) {
159159
if (options.inferTSConfig) {
160-
fs.writeFileSync(
161-
tsconfigFileName,
162-
'{"compilerOptions":{"allowJs":true}}'
163-
)
160+
fs.writeFileSync(tsconfigFileName, '{}')
164161
} else {
165162
console.error(`- ${options.projectDisplayName} (missing tsconfig.json)`)
166163
return

0 commit comments

Comments
 (0)