-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathtsconfig.json
More file actions
66 lines (66 loc) · 3.32 KB
/
tsconfig.json
File metadata and controls
66 lines (66 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"compilerOptions": {
"baseUrl": "frontend/",
"paths": {
"lib/*": ["src/lib/*"],
"scenes/*": ["src/scenes/*"],
"@posthog/lemon-ui": ["@posthog/lemon-ui/src/index"],
"@posthog/lemon-ui/*": ["@posthog/lemon-ui/src/*"],
"@posthog/icons": ["node_modules/@posthog/icons"],
"@posthog/shared-onboarding/*": ["../docs/onboarding/*"],
"storybook/*": ["../.storybook/*"],
"~/*": ["src/*"],
"public/*": ["public/*"],
"products/*": ["../products/*"],
"@common/*": ["../common/*"],
"@posthog/mosaic": ["../common/mosaic/src/index.ts"],
"@posthog/mosaic/*": ["../common/mosaic/src/*"],
"@posthog/replay-shared": ["../common/replay-shared/src/index.ts"],
"@posthog/replay-shared/*": ["../common/replay-shared/src/*"],
// Needed to access the subpath since torph didn't set up types properly
"torph/react": ["node_modules/torph/dist/react/index"]
},
// https://www.sitepoint.com/react-with-typescript-best-practices/
"allowJs": true, // Allow JavaScript files to be compiled
"skipLibCheck": true, // Skip type checking of all declaration files
"esModuleInterop": true, // Disables namespace imports (import * as fs from "fs") and enables CJS/AMD/UMD style imports (import fs from "fs")
"allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export
"strict": true, // Enable all strict type checking options
"forceConsistentCasingInFileNames": true, // Disallow inconsistently-cased references to the same file.
"module": "esnext", // Specify module code generation
"moduleResolution": "node", // Resolve modules using Node.js style
"isolatedModules": true,
"incremental": true,
"resolveJsonModule": true, // Include modules imported with .json extension
"noEmit": true, // Do not emit output (meaning do not compile code, only perform type checking)
"jsx": "react-jsx", // Support JSX in .tsx files
"target": "es2021",
"sourceMap": true, // Generate corrresponding .map file
"declaration": true, // Generate corresponding .d.ts file
"noUnusedLocals": true, // Report errors on unused locals
"noUnusedParameters": true, // Report errors on unused parameters
"noImplicitOverride": true, // Require the `override` modifier when overriding a base class member
"allowUnreachableCode": false, // Raise errors on unreachable code
"allowUnusedLabels": false, // Raise errors on unused labels
"experimentalDecorators": true, // Enables experimental support for ES decorators
"noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch statement
"lib": ["dom", "es2023"]
},
"include": [
"frontend/**/*",
".storybook/**/*",
"playwright/**/*",
"products/**/frontend/**/*",
"products/**/manifest.tsx",
"common/esbuilder/*",
"common/replay-shared/src/**/*",
"common/storybook/*",
"docs/onboarding/**/*"
],
"exclude": ["frontend/dist/**/*", "**/*.mdx"],
"ts-node": {
"compilerOptions": {
"module": "commonjs"
}
}
}