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:
briant
2026-07-21 11:06:29 -06:00
parent 0499c602dd
commit b15aabc7a2
4 changed files with 21 additions and 24 deletions
+3 -4
View File
@@ -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"]
}
}
-1
View File
@@ -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
View File
@@ -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": [