import type { Rule } from 'eslint'; import { ComputedCache } from '../cache.js'; import type { Minimatch } from 'minimatch'; import { type NormalizedAbsolutePath } from '../files.js'; /** * Cache for the available dependencies by dirname. Exported for tests */ export declare const dependenciesCache: ComputedCache, NormalizedAbsolutePath>; /** * Retrieve the dependencies of all the package.json files available for the given file. * * @param dir dirname of the context.filename * @param topDir working dir, will search up to that root * @returns Set with the dependency names */ export declare function getDependencies(dir: NormalizedAbsolutePath, topDir: NormalizedAbsolutePath): Set; export declare function getDependenciesSanitizePaths(context: Rule.RuleContext): Set; /** * Gets the React version from the closest package.json. * * @param context ESLint rule context * @returns React version string (coerced from range) or null if not found */ export declare function getReactVersion(context: Rule.RuleContext): string | null; /** * Parses a React version string and returns a valid semver version. * Exported for testing purposes. * * @param reactVersion Version string from package.json (e.g., "^18.0.0", "19.0", "catalog:frontend") * @returns Valid semver version string or null if parsing fails */ export declare function parseReactVersion(reactVersion: string): string | null;