MCPcopy
hub / github.com/xojs/xo / matchFilesForTsConfig

Function matchFilesForTsConfig

lib/utils.ts:56–65  ·  view source on GitHub ↗
(cwd: string, files: string[] | undefined, globs: string[], ignores: string[])

Source from the content-addressed store, hash-verified

54@returns An array of file paths that match the globs and do not match the ignores.
55*/
56export const matchFilesForTsConfig = (cwd: string, files: string[] | undefined, globs: string[], ignores: string[]) => micromatch(
57 files?.map(file => path.normalize(path.relative(cwd, file))) ?? [],
58 // https://github.com/micromatch/micromatch/issues/217
59 globs.map(glob => path.normalize(glob)),
60 {
61 dot: true,
62 ignore: ignores.map(file => path.normalize(file)),
63 cwd,
64 },
65).map(file => path.resolve(cwd, file));
66
67const legacyPropertyHints: Record<string, string> = {
68 overrides: 'Use an array of config objects with `files` patterns instead.',

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…