AFFiNE/tsconfig.json
2023-07-13 09:05:01 +00:00

162 lines
4.1 KiB
JSON

{
"compilerOptions": {
"verbatimModuleSyntax": true,
// Classification follows https://www.typescriptlang.org/tsconfig
// Type Checking
"strict": true,
// exactOptionalPropertyTypes: false,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
// noPropertyAccessFromIndexSignature: false,
// noUncheckedIndexedAccess: false,
// noUnusedLocals: false,
// noUnusedParameters: false,
"useUnknownInCatchVariables": true,
// Modules
"module": "ES2022",
"moduleResolution": "Node",
"resolveJsonModule": true,
// 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,
// Language and Environment
"jsx": "react-jsx",
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"target": "ES2022",
"useDefineForClassFields": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
// Projects
"composite": true,
"incremental": true,
// Completeness
"skipLibCheck": true, // skip all type checks for .d.ts files
"paths": {
"@affine/component": ["./packages/component/src/index"],
"@affine/component/*": [
"./packages/component/src/components/*/index",
"./packages/component/src/components/*"
],
"@affine/i18n": ["./packages/i18n/src"],
"@affine/i18n/hooks": ["./packages/i18n/src/i18n-generated"],
"@affine/debug": ["./packages/debug"],
"@affine/jotai": ["./packages/jotai"],
"@affine/env": ["./packages/env/src"],
"@affine/env/*": ["./packages/env/src/*"],
"@affine/utils": ["./packages/utils"],
"@affine/workspace/*": ["./packages/workspace/src/*"],
"@affine/graphql": ["./packages/graphql/src"],
"@affine/copilot": ["./plugins/copilot/src"],
"@affine/copilot/*": ["./plugins/copilot/src/*"],
"@affine/electron/scripts/*": ["./apps/electron/scripts/*"],
"@affine-test/kit/*": ["./tests/kit/*"],
"@affine-test/fixtures/*": ["./tests/fixtures/*"],
"@toeverything/infra": ["./packages/infra/src"],
"@toeverything/y-indexeddb": ["./packages/y-indexeddb/src"],
"@toeverything/hooks/*": ["./packages/hooks/src/*"],
"@toeverything/plugin-infra": ["./packages/plugin-infra/src"],
"@toeverything/plugin-infra/*": ["./packages/plugin-infra/src/*"],
"@affine/native": ["./packages/native/index.d.ts"],
"@affine/native/*": ["./packages/native/*"],
"@affine/storage": ["./packages/storage/index.d.ts"],
// Development only
"@affine/electron/*": ["./apps/electron/src/*"]
}
},
"include": [],
"references": [
// Apps
{
"path": "./apps/electron"
},
{
"path": "./apps/web"
},
{
"path": "./apps/server"
},
{
"path": "./apps/storybook"
},
// Top level packages
{
"path": "./packages/infra"
},
{
"path": "./packages/graphql"
},
{
"path": "./packages/debug"
},
// Plugins
{
"path": "./packages/plugin-infra"
},
{
"path": "./plugins/bookmark-block"
},
{
"path": "./plugins/copilot"
},
// Packages
{
"path": "./packages/component"
},
{
"path": "./packages/hooks"
},
{
"path": "./packages/i18n"
},
{
"path": "./packages/env"
},
{
"path": "./packages/workspace"
},
{
"path": "./packages/y-indexeddb"
},
// Tests
{
"path": "./tests/unit"
},
{
"path": "./tests/kit"
},
{
"path": "./tsconfig.node.json"
},
{
"path": "./tests/affine-local"
},
{
"path": "./tests/affine-legacy/0.7.0-canary.18"
}
],
"files": [],
"exclude": ["node_modules", "target", "lib", "test-results"]
}