Repository navigation
Expand file tree
/
Copy pathtsconfig.base.json
More file actions
64 lines (60 loc) · 2.46 KB
/
Copy pathtsconfig.base.json
File metadata and controls
64 lines (60 loc) · 2.46 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
{
// The single source of compiler options for this repo.
//
// Every `tsconfig.json` — the three packages, the two unpublished benchmark
// packages, the playground and the root — extends this, so a file is checked
// the same way wherever it is checked from. They used to be three separate
// copies that had already drifted (`bun-nest` still named a `.eslintrc` that
// no longer exists), and, more importantly, each package's `include` covered
// `./lib/**/*` alone. The IDE checks whatever file you open; `tsc --noEmit`
// checked only `lib`. Type errors in `__tests__/`, `scripts/` and
// `benchmarks/` could therefore sit in the tree indefinitely while every
// documented command reported success. They did.
//
// Only `paths` and `include` belong in the configs that extend this: the
// first is genuinely per-package, the second says which of that package's
// directories are its own rather than a nested project's.
"compilerOptions": {
"target": "ESNext",
"jsx": "react-jsx",
// Enable latest features
"lib": ["ESNext"],
"moduleDetection": "force",
// Decorators
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "ESNext",
// Bundler mode
"moduleResolution": "bundler",
// In-repo, a workspace package resolves to its `lib/` source, never to the
// built `dts/` declarations. Each published package's `exports` lists this
// condition ahead of `types`; consumers never set it, so they get `dts/`.
// Without it, the repo type-checks against whatever `dts/` a previous
// `build:types`/`prepack` left behind: a snapshot that goes stale on the
// next source edit (measured: a new export reads as TS2305 "has no
// exported member" until someone rebuilds).
"customConditions": ["@kingsleyweb/source"],
"typeRoots": [
"./node_modules/@types",
"../../node_modules/@types",
"./typings"
],
"allowImportingTsExtensions": true,
"allowJs": true,
// Best practices
"strict": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": false,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"declaration": true,
"noEmit": true,
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": false,
"verbatimModuleSyntax": true,
"skipLibCheck": true
}
}