/** * Validate TypeScript Files in src/ Executor * * Two-layer rule: * Layer 1: every .ts file inside an Nx project must live under src/ * (jest.config.ts at project root is the only exception) * Layer 2: every .ts file anywhere in the workspace must belong to some * Nx project. Orphan files (at workspace root or in a non-project * directory) fail the rule unless explicitly allowlisted. * * Configurable via nx.json targetDefaults: * "validate-ts-in-src": { * "options": { * "mode": "ON", * "excludePaths": [...], * "allowedRootFiles": [...] * } * } * * Usage: nx run architecture:validate-ts-in-src */ import type { ExecutorContext } from '@nx/devkit'; export type ValidateTsInSrcMode = 'ON' | 'OFF'; export interface ValidateTsInSrcOptions { mode?: ValidateTsInSrcMode; excludePaths?: string[]; allowedRootFiles?: string[]; } export interface ExecutorResult { success: boolean; } export default function runExecutor(_nxOptions: ValidateTsInSrcOptions, context: ExecutorContext): Promise;