/** * @fileoverview defineCheck - Unified check definition API * * The main API for creating fitness checks. Supports three modes: * - analyze: Per-file analysis with content and path * - analyzeAll: Multi-file analysis with lazy loading FileAccessor * - command: External tool execution with output parsing * * Check authors return CheckViolation[]. The framework converts each * CheckViolation into a universal Signal via createSignal(). */ import type { UnifiedCheckConfig } from './check-config.js'; import type { Check } from './check-types.js'; /** * Define a fitness check using the unified API. * * @example * ```typescript * export const noConsoleLog = defineCheck({ * id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', * slug: 'no-console-log', * category: 'quality', * description: 'Disallow console.log in production code', * analyze: (content, filePath) => { * const violations: CheckViolation[] = []; * content.split('\n').forEach((line, idx) => { * if (line.includes('console.log')) { * violations.push({ line: idx + 1, message: 'No console.log', severity: 'error' }); * } * }); * return violations; * }, * }); * ``` * @throws {ValidationError} When the check config is invalid */ export declare function defineCheck(config: UnifiedCheckConfig): Check; //# sourceMappingURL=define-check.d.ts.map