710 B
710 B
Step 02 — Phase 2.1: 适配器接口
依赖: Step 01
参考设计: §3.2
目标
将 LinterAdapter 接口从 types.ts 精化到适配器模块中,作为所有适配器的统一接口。
新建文件
| # | 文件 | 说明 |
|---|---|---|
| 1 | src/adapters/adapter.ts |
重新导出/精化 LinterAdapter 接口 |
src/adapters/adapter.ts
import { LinterAdapter } from '../types';
export type { LinterAdapter };
export type { LinterDiagnostic, AdapterResult, AdapterStatus } from '../types';
如果后续适配器需要额外的共享类型,在此文件中扩展。
验收
- 文件创建完成
npm run compile通过