From 1e358277034f81b7f71ac9f64dc5ef1432ec810e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 14 Jun 2026 19:14:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(dacli):=20=E6=8A=BD=20=5Fblindspots.ts=20?= =?UTF-8?q?=E9=AA=A8=E6=9E=B6,=20BS=205=20=E5=BF=85=E6=9F=A5=20ID=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/form/_blindspots.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/commands/form/_blindspots.ts 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