mirror of
https://github.com/civitai/civitai.git
synced 2026-09-20 22:08:18 +08:00
chore(tsconfig): drop deprecated baseUrl and node moduleResolution alias
Silence editor deprecation warnings across the tsconfigs: - Remove `baseUrl` from root, civitai-ui, and event-engine configs; TS 5.0+ resolves `paths` relative to the config file, so rewrite the affected path targets to be config-relative (`~/*` -> `./src/*`, `@civitai/*` and event- engine's `@/*` likewise). - Convert the one bare dynamic import that relied on implicit baseUrl resolution (TrainingAutoLabelModal) to the `~/` alias. - Rename event-engine's `moduleResolution` from the deprecated `node` alias to its current name `node10` (identical behavior). Verified: root `pnpm typecheck`, event-engine `tsc --noEmit` + full `tsc && tsc-alias` build all pass; tsc-alias/tsconfig-paths resolve without baseUrl (they default to the config dir). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,17 +13,16 @@
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
"moduleResolution": "node",
|
||||
"moduleResolution": "node10",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": ".tsbuildinfo",
|
||||
"baseUrl": "./src",
|
||||
"paths": {
|
||||
"@/*": ["*"]
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"skipLibCheck": true,
|
||||
"isolatedModules": true,
|
||||
"resolveJsonModule": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@civitai/ui/*": ["./src/lib/*"]
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ const TrainingImagesCaptionViewer = dynamic(
|
||||
);
|
||||
|
||||
const AutoLabelModal = dynamic(
|
||||
() => import('components/Training/Form/TrainingAutoLabelModal').then((m) => m.AutoLabelModal),
|
||||
() => import('~/components/Training/Form/TrainingAutoLabelModal').then((m) => m.AutoLabelModal),
|
||||
{ ssr: false }
|
||||
);
|
||||
|
||||
|
||||
+17
-18
@@ -21,25 +21,24 @@
|
||||
"jsx": "react-jsx",
|
||||
"incremental": true,
|
||||
"noUncheckedIndexedAccess": false, // TODO swap to true
|
||||
"baseUrl": "src",
|
||||
"paths": {
|
||||
"~/*": ["./*"],
|
||||
"@civitai/db-schema": ["../packages/civitai-db-schema/src/index"],
|
||||
"@civitai/db-schema/*": ["../packages/civitai-db-schema/src/*"],
|
||||
"@civitai/db": ["../packages/civitai-db/src/index"],
|
||||
"@civitai/db/*": ["../packages/civitai-db/src/*"],
|
||||
"@civitai/redis": ["../packages/civitai-redis/src/index"],
|
||||
"@civitai/redis/*": ["../packages/civitai-redis/src/*"],
|
||||
"@civitai/clickhouse": ["../packages/civitai-clickhouse/src/index"],
|
||||
"@civitai/clickhouse/*": ["../packages/civitai-clickhouse/src/*"],
|
||||
"@civitai/axiom": ["../packages/civitai-axiom/src/index"],
|
||||
"@civitai/axiom/*": ["../packages/civitai-axiom/src/*"],
|
||||
"@civitai/telemetry": ["../packages/civitai-telemetry/src/index"],
|
||||
"@civitai/telemetry/*": ["../packages/civitai-telemetry/src/*"],
|
||||
"@civitai/brand": ["../packages/civitai-brand/src/index"],
|
||||
"@civitai/brand/*": ["../packages/civitai-brand/src/*"],
|
||||
"@civitai/notifications": ["../packages/civitai-notifications/src/index"],
|
||||
"@civitai/notifications/*": ["../packages/civitai-notifications/src/*"]
|
||||
"~/*": ["./src/*"],
|
||||
"@civitai/db-schema": ["./packages/civitai-db-schema/src/index"],
|
||||
"@civitai/db-schema/*": ["./packages/civitai-db-schema/src/*"],
|
||||
"@civitai/db": ["./packages/civitai-db/src/index"],
|
||||
"@civitai/db/*": ["./packages/civitai-db/src/*"],
|
||||
"@civitai/redis": ["./packages/civitai-redis/src/index"],
|
||||
"@civitai/redis/*": ["./packages/civitai-redis/src/*"],
|
||||
"@civitai/clickhouse": ["./packages/civitai-clickhouse/src/index"],
|
||||
"@civitai/clickhouse/*": ["./packages/civitai-clickhouse/src/*"],
|
||||
"@civitai/axiom": ["./packages/civitai-axiom/src/index"],
|
||||
"@civitai/axiom/*": ["./packages/civitai-axiom/src/*"],
|
||||
"@civitai/telemetry": ["./packages/civitai-telemetry/src/index"],
|
||||
"@civitai/telemetry/*": ["./packages/civitai-telemetry/src/*"],
|
||||
"@civitai/brand": ["./packages/civitai-brand/src/index"],
|
||||
"@civitai/brand/*": ["./packages/civitai-brand/src/*"],
|
||||
"@civitai/notifications": ["./packages/civitai-notifications/src/index"],
|
||||
"@civitai/notifications/*": ["./packages/civitai-notifications/src/*"]
|
||||
},
|
||||
"noErrorTruncation": true,
|
||||
"plugins": [
|
||||
|
||||
Reference in New Issue
Block a user