import type { ContentRule, ContentCheckResult, Policy } from '../types.js'; /** * Result of checking content with detailed match info */ export interface ContentMatch { file: string; line: number; column: number; match: string; rule: ContentRule; } /** * Strip single-line and multi-line comments from code. * Preserves line numbers by replacing with spaces. */ export declare function stripComments(content: string): string; /** * Strip string literals from code, replacing with placeholder. * Preserves line numbers. */ export declare function stripStrings(content: string): string; /** * Check if a file path matches any of the file type patterns. */ export declare function fileMatchesPatterns(filePath: string, patterns: string[]): boolean; /** * Check content against a single content rule. */ export declare function checkContentRule(content: string, filePath: string, rule: ContentRule): ContentMatch | null; /** * Check content against all content rules in a policy. */ export declare function checkContent(content: string, filePath: string, policy: Policy): ContentCheckResult; /** * Check content against multiple policies. */ export declare function checkContentAgainstPolicies(content: string, filePath: string, policies: Policy[]): ContentCheckResult & { policy?: Policy; }; /** * Get all matches for a rule in content. */ export declare function findAllMatches(content: string, filePath: string, rule: ContentRule): ContentMatch[]; /** * Pattern set for detecting lodash usage. * Covers: ES imports, CommonJS, dynamic imports, submodules, individual packages */ export declare const LODASH_PATTERNS: { esDefault: string; esNamed: string; esNamespace: string; esSubmodule: string; esIndividual: string; esLodashEs: string; cjsRequire: string; cjsSubmodule: string; cjsIndividual: string; dynamicImport: string; any: string; }; /** * Pattern set for detecting TypeScript 'any' type usage. * Covers: annotations, generics, assertions, type aliases, defaults */ export declare const ANY_TYPE_PATTERNS: { annotation: string; annotationArray: string; genericParam: string; genericInArray: string; genericInRecord: string; genericInPromise: string; genericInMap: string; genericInSet: string; asAny: string; asUnknownAsAny: string; typeAlias: string; typeAliasPartial: string; genericDefault: string; returnAny: string; extendsAny: string; intersectionAny: string; unionAny: string; common: string; }; /** * Pattern set for detecting console usage. * Covers: direct calls, destructuring, aliasing, bracket notation */ export declare const CONSOLE_PATTERNS: { log: string; warn: string; error: string; info: string; debug: string; trace: string; table: string; dir: string; bracket: string; destructure: string; alias: string; anyMethod: string; }; /** * Pattern set for detecting React class components. * Covers: Component, PureComponent, with/without React prefix */ export declare const CLASS_COMPONENT_PATTERNS: { component: string; pureComponent: string; any: string; }; /** * Pattern set for detecting eval usage. * Covers: direct eval, Function constructor, setTimeout/setInterval with strings */ export declare const EVAL_PATTERNS: { direct: string; functionConstructor: string; setTimeoutString: string; setIntervalString: string; any: string; }; /** * Pattern set for moment.js detection. */ export declare const MOMENT_PATTERNS: { esImport: string; cjsRequire: string; dynamicImport: string; any: string; }; export declare const COMMON_PATTERNS: { readonly lodashImport: string; readonly lodashRequire: string; readonly anyLodash: string; readonly consoleLog: string; readonly consoleWarn: string; readonly consoleError: string; readonly anyConsole: string; readonly classComponent: string; readonly reactClass: string; readonly anyType: string; readonly anyTypeGeneric: string; readonly asAny: string; readonly momentImport: string; readonly jqueryImport: string; readonly underscoreImport: string; readonly eval: string; readonly innerHtml: string; readonly dangerouslySetInnerHTML: string; readonly todoComment: string; readonly fixmeComment: string; readonly debugger: string; }; export declare const EXCEPTION_PATTERNS: { anyInVariableName: string; consoleInTest: string; lodashMigration: string; }; //# sourceMappingURL=content.d.ts.map