xo
Version:
JavaScript/TypeScript linter (ESLint wrapper) with great defaults
15 lines (12 loc) • 895 B
TypeScript
/**
This function checks if the files are matched by the tsconfig include/exclude, and returns the unmatched files.
All unincluded files are routed through a generated tsconfig (`parserOptions.project`) so that autofix works correctly across multiple ESLint passes. The in-memory Program approach is intentionally not used here because `@typescript-eslint/typescript-estree` always returns the AST built from the original file text when using `parserOptions.programs`, ignoring the updated `code` ESLint passes on subsequent fix passes, which causes file corruption.
@param options - The options for handling the tsconfig.
@param options.files - The TypeScript files to check against the tsconfig.
@param options.cwd - The current working directory.
@returns The unincluded files.
*/
export declare function handleTsconfig({ files, cwd }: {
files: string[];
cwd: string;
}): string[];