Skip to content

Commit

Permalink
fix: support TSConfig include globs (#1062)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg authored Nov 9, 2022
1 parent 890afa1 commit 4e84eb7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/options/parseRawCompilerOptions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import minimatch from "minimatch";
import glob from "glob";
import * as fs from "mz/fs";
import * as path from "path";
import * as ts from "typescript";
Expand Down Expand Up @@ -30,9 +31,7 @@ export const parseRawCompilerOptions = async (cwd: string, projectPath: string):
useCaseSensitiveFileNames: true,
readDirectory: (rootDir, extensions, excludes, includes) =>
includes
.flatMap((include) =>
fs.readdirSync(path.join(rootDir, include)).map((fileName) => path.join(rootDir, include, fileName)),
)
.flatMap((include) => glob.sync(path.join(rootDir, include)))
.filter(
(filePath) =>
!excludes?.some((exclude) => minimatch(filePath, exclude)) &&
Expand Down

0 comments on commit 4e84eb7

Please sign in to comment.