AFFiNE/tsconfig.json

170 lines
4.5 KiB
JSON
Raw Normal View History

{
"compilerOptions": {
"verbatimModuleSyntax": true,
// Classification follows https://www.typescriptlang.org/tsconfig
// Type Checking
"strict": true,
2023-09-14 11:47:15 +03:00
"exactOptionalPropertyTypes": false,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
2023-09-14 11:47:15 +03:00
"noUnusedLocals": true,
"noUnusedParameters": true,
"noPropertyAccessFromIndexSignature": false,
"noUncheckedIndexedAccess": false,
"useUnknownInCatchVariables": true,
// Modules
2023-08-05 03:00:36 +03:00
"module": "ESNext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
2023-08-10 22:56:16 +03:00
"types": ["affine__env"],
// Emit
"declaration": true,
"declarationMap": true,
"sourceMap": true,
// skip type emit for @internal types
// "stripInternal": true,
// JavaScript Support
"allowJs": false,
"checkJs": false,
// Interop Constraints
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
2023-08-05 03:00:36 +03:00
"isolatedModules": true,
// Language and Environment
2023-08-05 03:00:36 +03:00
"jsx": "preserve",
"jsxImportSource": "@emotion/react",
"lib": ["ESNext", "DOM"],
"target": "ES2022",
2023-06-28 06:43:13 +03:00
"useDefineForClassFields": false,
"experimentalDecorators": true,
2024-04-17 09:12:29 +03:00
"emitDecoratorMetadata": false,
// Projects
"composite": true,
"incremental": true,
// Completeness
"skipLibCheck": true, // skip all type checks for .d.ts files
"paths": {
"@affine/core/*": ["./packages/frontend/core/src/*"],
"@affine/core": ["./packages/frontend/core/src/index.ts"],
2024-06-18 09:01:13 +03:00
"@affine/admin/*": ["./packages/frontend/admin/src/*"],
"@affine/admin/components/ui/*": [
"./packages/frontend/admin/src/components/ui/*"
],
"@affine/cli/*": ["./tools/cli/src/*"],
"@affine/server/*": ["./packages/backend/server/src/*"],
"@affine/component": ["./packages/frontend/component/src/index"],
"@affine/component/*": [
"./packages/frontend/component/src/components/*/index",
"./packages/frontend/component/src/components/*"
],
"@affine/i18n": ["./packages/frontend/i18n/src"],
"@affine/debug": ["./packages/common/debug"],
"@affine/env": ["./packages/common/env/src"],
"@affine/env/*": ["./packages/common/env/src/*"],
"@affine/graphql": ["./packages/frontend/graphql/src"],
"@affine/electron/scripts/*": ["./packages/frontend/electron/scripts/*"],
"@affine-test/kit/*": ["./tests/kit/*"],
2023-04-02 10:57:50 +03:00
"@affine-test/fixtures/*": ["./tests/fixtures/*"],
"@toeverything/infra": ["./packages/common/infra/src"],
"@affine/native": ["./packages/frontend/native/index.d.ts"],
"@affine/native/*": ["./packages/frontend/native/*"],
"@affine/server-native": ["./packages/backend/native/index.d.ts"],
// Development only
"@affine/electron/*": ["./packages/frontend/electron/src/*"]
}
},
"include": [],
2023-02-17 05:43:52 +03:00
"references": [
// Backend
2023-02-17 05:43:52 +03:00
{
"path": "./packages/backend/server"
2023-04-25 02:53:36 +03:00
},
{
"path": "./packages/backend/server/tests"
},
// Frontend
2024-06-18 09:01:13 +03:00
{
"path": "./packages/frontend/admin"
},
{
"path": "./packages/frontend/component"
},
{
"path": "./packages/frontend/core"
},
{
"path": "./packages/frontend/web"
},
2023-07-18 19:53:10 +03:00
{
"path": "./packages/frontend/electron/tsconfig.test.json"
2023-07-18 19:53:10 +03:00
},
{
"path": "./packages/frontend/electron/renderer/tsconfig.json"
},
2023-06-08 04:41:20 +03:00
{
"path": "./packages/frontend/graphql"
2023-06-08 04:41:20 +03:00
},
{
"path": "./packages/frontend/i18n"
},
// Common
2023-07-20 22:28:55 +03:00
{
"path": "./packages/common/debug"
2023-07-20 22:28:55 +03:00
},
2023-08-03 07:47:05 +03:00
{
"path": "./packages/common/env"
2023-08-03 07:47:05 +03:00
},
2023-08-06 06:59:14 +03:00
{
"path": "./packages/common/infra"
2023-08-06 06:59:14 +03:00
},
// Tools
2023-04-03 12:32:43 +03:00
{
"path": "./tools/cli"
2023-04-03 12:32:43 +03:00
},
// Tests
{
"path": "./tests/kit"
},
{
"path": "./tests/affine-local"
},
{
"path": "./tests/affine-migration"
},
{
"path": "./tests/affine-legacy/0.7.0-canary.18"
},
{
"path": "./tests/affine-legacy/0.8.0-canary.7"
},
{
"path": "./tests/affine-cloud"
},
{
"path": "./tests/affine-desktop"
},
{
"path": "./tests/affine-legacy/0.8.4"
},
{
"path": "./tests/affine-legacy/0.6.1-beta.1"
},
// Others
{
"path": "./tsconfig.node.json"
2023-02-17 05:43:52 +03:00
}
],
2023-02-18 05:08:52 +03:00
"files": [],
"exclude": ["node_modules", "target", "lib", "test-results"],
"ts-node": {
2023-10-21 03:28:04 +03:00
"esm": true,
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Node"
}
}
}