-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathtsconfig.base.json
More file actions
61 lines (48 loc) · 2.31 KB
/
tsconfig.base.json
File metadata and controls
61 lines (48 loc) · 2.31 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
// This configuration is a standard baseline for all packages.
//
// Copied from @nacho-iot/js-tools. Edits are preserved; `nacho-build configure` replaces with the latest template.
{
"compilerOptions": {
// Participate in workspace
"composite": true,
// Add compatibility with CommonJS modules
"esModuleInterop": true,
// Compile incrementally using tsbuildinfo state file
"incremental": true,
// Matter.js most likely won't work with older versions of ES
"target": "es2022",
// Generate modules as ES2020 or CommonJS
"module": "node16",
// Use node-style dependency resolution
"moduleResolution": "node16",
// Do not load globals from node_modules by default
"types": [],
// Preserve const enums with tsc (esbuild does this by default)
"preserveConstEnums": true,
// Validating imports would be nice but is very slow; we can get by without
"skipLibCheck": true,
// Resolve hand-authored .d.ts source files in packages that ship them (@matter/types/clusters/*,
// @matter/testing, @matter/node/load). tsc cannot emit a proper .d.ts output from a .d.ts input,
// so the dist/ copy is not interchangeable with src for consumer symbol resolution. Targets that
// ship as .ts sources do not need this — tsc emits dist/ .d.ts that work fine for consumers.
"customConditions": [ "dev-types" ],
"lib": [
"es2022",
"ESNext.Disposable",
// Many standard types are only available via node or DOM. Neither are fully appropriate for our purposes,
// however the DOM types are closer to the standard and add fewer objects that are not present at runtime
// (namely window and document, which we don't have much use for and know to avoid)
//
// Unfortunately TS doesn't break types into individual libs, so we must import the entire DOM
"dom"
],
// Enforce a subset of our code conventions
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"strict": true,
"isolatedModules": true,
}
}