Files
civitai__civitai/tsconfig.json
T
briant b15aabc7a2 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>
2026-07-21 11:06:29 -06:00

73 lines
2.2 KiB
JSON

{
"compilerOptions": {
"target": "ES2018",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
// "types": ["offscreencanvas"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"incremental": true,
"noUncheckedIndexedAccess": false, // TODO swap to true
"paths": {
"~/*": ["./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": [
{
"name": "next"
}
]
},
"include": [
// "next-env.d.ts",
// "**/*.ts",
// "**/*.tsx",
// "**/*.cjs",
// "**/*.mjs",
"scripts/local-dev/*.ts",
"src",
"packages/*/src",
"tests",
"test",
".next/types/**/*.ts"
],
"exclude": [
"node_modules",
"./node_modules",
"./node_modules/*",
"src/pages/api/dev-local/*.ts",
"scripts/local-dev/*.ts",
"src/**/__tests__/**",
"packages/civitai-ui"
]
}