forked from PostHog/posthog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.json
48 lines (48 loc) · 2.63 KB
/
tsconfig.json
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
{
"compilerOptions": {
"baseUrl": "frontend/",
"paths": {
"lib/*": ["src/lib/*"],
"scenes/*": ["src/scenes/*"],
"@posthog/apps-common": ["@posthog/apps-common/src/index"],
"@posthog/apps-common/*": ["@posthog/apps-common/src/*"],
"@posthog/lemon-ui": ["@posthog/lemon-ui/src/index"],
"@posthog/lemon-ui/*": ["@posthog/lemon-ui/src/*"],
"storybook/*": ["../.storybook/*"],
"@posthog/ee/exports": ["../ee/exports", "@posthog/ee/exports"],
"~/*": ["src/*"],
"public/*": ["public/*"]
},
// 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
"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
"experimentalDecorators": true, // Enables experimental support for ES decorators
"noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch statement
// FIXME: suppressImplicitAnyIndexErrors is deprecated and will be removed in TS 5.5, but we have MANY of these
"suppressImplicitAnyIndexErrors": true, // Index objects by number
"ignoreDeprecations": "5.0",
"lib": ["dom", "es2021"]
},
"include": ["frontend/**/*", ".storybook/**/*", "playwright/**/*", "ee/frontend/**/*"],
"exclude": ["frontend/dist/**/*"],
"ts-node": {
"compilerOptions": {
"module": "commonjs"
}
}
}