fix: 仅前端配置 vite-env.d.ts 空接口导致 lint 失败

- include_backend=false 时 ImportMetaEnv 渲染为空接口,触发 eslint
  no-empty-object-type;改为整个接口块仅在有 VITE 变量时生成
- 回归测试发现:6 配置矩阵中唯一失败项,其余全绿

全面回归通过:6 种服务/数据库/LLM 配置生成 rc=0,各服务 ruff/mypy/import
与前端 build/lint/tsc 全过,0 PPT 残留,完整 _tasks 端到端 OK,
skill 本地+远程安装 OK,生成项目 verify.sh 零失败,check-docs 一致。
This commit is contained in:
baozaotumao
2026-06-02 01:15:37 -07:00
parent 871e0589cd
commit 0e9c862ade
+2 -3
View File
@@ -1,12 +1,11 @@
/// <reference types="vite/client" /> /// <reference types="vite/client" />
{% if include_backend %}
interface ImportMetaEnv { interface ImportMetaEnv {
{%- if include_backend %}
readonly VITE_BACKEND_WS_URL: string; readonly VITE_BACKEND_WS_URL: string;
readonly VITE_BACKEND_HTTP_URL: string; readonly VITE_BACKEND_HTTP_URL: string;
{%- endif %}
} }
interface ImportMeta { interface ImportMeta {
readonly env: ImportMetaEnv; readonly env: ImportMetaEnv;
} }
{%- endif %}