/** * Validate New Methods Executor * * Validates that newly added methods don't exceed a maximum line count. * Runs in affected mode when: * 1. NX_BASE environment variable is set (via nx affected), OR * 2. Auto-detects base by finding merge-base with origin/main * * This validator encourages writing methods that read like a "table of contents" * where each method call describes a larger piece of work. * * Usage: * nx affected --target=validate-new-methods --base=origin/main * OR: runs automatically via build's architecture:validate-complete dependency * * Escape hatch: Add webpieces-disable max-lines-new-methods comment with justification */ import type { ExecutorContext } from '@nx/devkit'; export type MethodMaxLimitMode = 'OFF' | 'NEW_METHODS' | 'NEW_AND_MODIFIED_METHODS' | 'MODIFIED_FILES'; export interface ValidateNewMethodsOptions { limit?: number; mode?: MethodMaxLimitMode; disableAllowed?: boolean; } export interface ExecutorResult { success: boolean; } export default function runExecutor(options: ValidateNewMethodsOptions, context: ExecutorContext): Promise;