Skip to content

Commit 707c96d

Browse files
committed
Only try to use tsconfig files if tsconfig.json exists
1 parent 3485d67 commit 707c96d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/knip/src/graph/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export async function build({
288288

289289
principal.addEntryPaths(userEntryPaths);
290290

291-
if (options.isUseTscFiles) {
291+
if (options.isUseTscFiles && isFile) {
292292
const isIgnoredWorkspace = chief.createIgnoredWorkspaceMatcher(name, dir);
293293
debugLogArray(name, 'Using tsconfig files as project files', tscSourcePaths);
294294
for (const filePath of tscSourcePaths) {

0 commit comments

Comments
 (0)