diff --git a/src/commands/form/_blindspots.ts b/src/commands/form/_blindspots.ts new file mode 100644 index 0000000..756344d --- /dev/null +++ b/src/commands/form/_blindspots.ts @@ -0,0 +1,22 @@ +/** + * commands/form/_blindspots.ts — 5 类盲点规则 (设计期 lint + 运行时 validate 共享) + * + * 单一事实源: BS-23 / BS-31 / BS-32 / BS-15 / BS-V2 + * 调用方: validate.ts (运行时, 需 form id) + * lint.ts (设计期, 不需 JNPF server) + */ +import type { FormDetail } from '../../core/types.ts' + +export interface BlindspotIssue { + id: 'BS-23' | 'BS-31' | 'BS-32' | 'BS-15' | 'BS-V2' + level: 'ERROR' | 'WARN' + path: string + message: string +} + +export interface BlindspotResult { + issues: BlindspotIssue[] + blindspotIds: string[] // e.g. ['BS-23', 'BS-31', ...] — 5 必查 ID 列表 +} + +export const BLINDSPOT_IDS = ['BS-23', 'BS-31', 'BS-32', 'BS-15', 'BS-V2'] as const \ No newline at end of file