From 67bc87f69d2c54161fca16870a76f631c21e3448 Mon Sep 17 00:00:00 2001 From: claude_dev Date: Fri, 31 Jul 2026 14:03:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E7=BA=B3=E5=85=A5frontend/tsconfig*?= =?UTF-8?q?.json(vue-tsc=20build=20=E9=9C=80=E8=A6=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根.gitignore *.json 同样忽略了 tsconfig.json/tsconfig.app.json/tsconfig.node.json → CI checkout 缺 → vue-tsc -b 报 TS5083 Cannot read tsconfig.json。加 !tsconfig*.json 例外。 --- .gitignore | 1 + frontend/tsconfig.app.json | 18 ++++++++++++++++++ frontend/tsconfig.json | 7 +++++++ frontend/tsconfig.node.json | 23 +++++++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 frontend/tsconfig.app.json create mode 100644 frontend/tsconfig.json create mode 100644 frontend/tsconfig.node.json diff --git a/.gitignore b/.gitignore index 2d1ed54..10857dc 100644 --- a/.gitignore +++ b/.gitignore @@ -98,6 +98,7 @@ setting/ !pyproject.toml !package.json !package-lock.json +!tsconfig*.json # Docker deployment files (may contain sensitive paths) docker/.env diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json new file mode 100644 index 0000000..4c351d2 --- /dev/null +++ b/frontend/tsconfig.app.json @@ -0,0 +1,18 @@ +{ + "extends": "@vue/tsconfig/tsconfig.dom.json", + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "types": ["vite/client", "vitest/globals"], + "allowArbitraryExtensions": true, + "paths": { + "@/*": ["./src/*"] + }, + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts"] +} diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 0000000..1ffef60 --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json new file mode 100644 index 0000000..8455dcb --- /dev/null +++ b/frontend/tsconfig.node.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023"], + "types": ["node"], + "skipLibCheck": true, + + /* Bundler mode */ + "module": "nodenext", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["vite.config.ts"] +}