/** * Support declarations hoisted verbatim out of `project-context.ts` by the * b1 file-size campaign: the package.json reader, the build-tool config probe * and its candidate table, the semver-major helper, the CSS-conflict / * state-management / routing / data-fetching / notable-dependency tables, the * package-level legacy-signal collector, the sampled-JSX marker scanner and * the directory-walk helpers it walks with — plus the two display-label maps * that were finding-free where they stood. * * Signatures, bodies, tables and comments are unchanged; the two long * signatures that could not take an `export ` prefix without being re-wrapped * are exported from the footer below so every moved line stays byte-identical. * * What deliberately stayed in `project-context.ts` is every declaration that * carries a lint finding today: the `_projectRoot` `no-unused-vars` cluster * behind the detector table, `detectCssFrameworks` and * `componentLibraryLabel` (both over the `complexity` threshold), * `collectSourceFileLegacySignals` (`no-magic-numbers`) and * `sampleSourceFiles` (a non-null assertion). A campaign sibling must be * clean outright, so a finding-carrying declaration cannot be hoisted into * one — which is also why only two of the three label maps live here. */ import { statSync } from 'node:fs'; import type { BuildTool, ComponentLibrary, CssFramework } from './project-context-types.js'; declare function readPackageJson(projectRoot: string): { exists: boolean; deps: Record; }; export declare function detectBuildTool(projectRoot: string): { tool: BuildTool; path?: string; }; export declare function majorOf(version: string | undefined): string | undefined; declare function detectCssConflicts(library: ComponentLibrary, frameworks: CssFramework[]): string[]; export declare function detectStateManagement(deps: Record): string[]; export declare function detectRouting(deps: Record): string[]; export declare function detectDataFetching(deps: Record): string[]; export declare function collectPackageLegacySignals(deps: Record, signals: string[]): void; export declare function scanSampleForLegacyMarkers(sample: readonly string[]): { classComponentHits: number; inlineStyleHits: number; }; export declare function readDirOrEmpty(dir: string): string[]; export declare function statOrNull(path: string): ReturnType | null; export declare function isIgnoredEntry(entry: string): boolean; export declare function isJsxFile(entry: string): boolean; export declare function notableDepsList(deps: Record): string[]; export declare function buildToolLabel(tool: BuildTool): string; export declare function cssFrameworkLabel(framework: CssFramework): string; export { readPackageJson, detectCssConflicts };