import type { ScopeMode } from '../../workspace/affected.js'; export declare function check(cwd: string, scope?: ScopeMode): Promise; export interface ModuleScope { readonly paths: string[]; /** * True when every module is in scope. A graph-wide derivation — the Q7 * `structuralMax` — only reflects the whole codebase when this holds; under a * scoped run it sees a subset and the derived value is a lower bound. */ readonly all: boolean; /** * Set when a pipework.config.ts was found but could not be loaded (#335). * The module set then comes from filesystem discovery and is not the declared * one — `--module` is not applied and the set can be empty. `check` reports * this as a failed step; it must never contribute to a green exit. */ readonly configError?: Error; /** Population line from `resolveAffected` — what the module scope was computed from. */ readonly basis?: string; } export declare function resolveModulePaths(cwd: string, scope?: ScopeMode): Promise; export declare function verifyVitestConfig(cwd: string): Promise; export declare function verifyEslintConfig(cwd: string): boolean; export declare function runFlowCheck(cwd: string, sourceFiles: string[]): boolean; export declare function runCardinalityCheck(cwd: string, sourceFiles: string[], configuredStructuralMax?: number, fullScope?: boolean): boolean; export declare function runCoverageCheckWarning(cwd: string, sourceFiles: string[], extras?: Readonly>): void; export declare function resolveTscBin(cwd: string): string; export declare function resolveEslintBin(cwd: string): string; export declare function eslintCacheLocation(cwd: string, version: string, label: string, fingerprint?: string): string; /** * A hash of the tsconfigs the typescript project service will resolve for `targets`. * * The type-aware rules produce their verdict from the program that tsconfig defines, * and a parse error is a verdict about the tsconfig alone. eslint's `--cache` key is * (content + eslint config + eslint version) — none of that moves when a tsconfig * does, so a cached verdict survives the checkout that changed it (#409). Stamping * the chain into the cache path makes any change point eslint at a fresh file. * * Covered: the nearest `tsconfig.json` above each target, up to `dir`, and every file * its `extends` reaches. Not covered: `references`, and a tsconfig outside `dir`. */ export declare function tsconfigFingerprint(dir: string, targets: readonly string[]): string; /** * True when eslint reported a fatal parse error — a file it could not read at all. * * Distinct from a rule failure: it says the program the tsconfig defines could not be * built, so it is never a fact about the file's content alone, and must not outlive * the state that produced it in a cache eslint will happily reuse (#409). */ export declare function hasFatalParseError(stdout: string): boolean; /** * The globs eslint is pointed at for `dir`, relative to `dir`. * * `configured` is the module's `lint.include` (or the global one). Unset, the globs * cover `src` plus the `src` of each workspace package under `dir` — a nested pnpm * workspace keeps its sources one level further down, and `eslint src` never sees * them (#393). */ export declare function lintTargets(dir: string, configured?: readonly string[]): string[]; /** * The files eslint actually linted, and any it refused, from `--format json` output. * * A file eslint declines to lint still appears in the report, carrying a single * message with no rule — "File ignored because no matching configuration was * supplied", or because it sits outside the base path. That is a silent skip, not a * pass, so `check` treats it as a failure rather than counting the file green. */ export declare function readEslintReport(stdout: string): { linted: string[]; ignored: Array<{ file: string; reason: string; }>; }; export declare function lintDirectory(eslintBin: string, dir: string, label: string, cacheLocation: string | ((fingerprint: string) => string), configured?: readonly string[]): Promise; /** * Root-level lintable files that no module covers (#402). * * `lint.include` for `.` — else the default `src` globs — minus everything under a * module path, which the module loop already linted. What remains is the population * `check` used to count as if it did not exist. */ export declare function rootFilesOutsideModules(cwd: string, modulePaths: readonly string[], configured?: readonly string[]): string[]; //# sourceMappingURL=check.d.ts.map