Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
41 lines (41 loc) · 1.69 KB
/
Copy pathtsconfig.json
File metadata and controls
41 lines (41 loc) · 1.69 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
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
// Vite resolves imports, so TypeScript should read `package.json` `exports` the
// same way it does. The legacy "node" mode cannot see subpaths like
// `vitest/browser`, which the browser tests import.
"moduleResolution": "bundler",
"esModuleInterop": true,
"declaration": true,
"outDir": "ts-dist",
// Without this, TypeScript infers the output layout from the common directory of
// whatever is in the program, so emitting to `ts-dist/src/...` depended on some
// file outside `src` being pulled in -- which `test-utils.ts` did, by being
// imported from the tests. `gulp buildTypes` looks for `ts-dist/src`, so pin it
// rather than let it move when the set of files changes.
"rootDir": ".",
"emitDeclarationOnly": true,
"allowJs": true,
"checkJs": true,
"skipLibCheck": true,
"resolveJsonModule": true
},
// `src` is what ships. The root-level globs pick up the tooling that configures the
// build and tests around it: those files belong to no project otherwise, so the
// type-aware lint rules either fail to find them or fall back to an inferred
// project that ignores the strictness settings above. Globs rather than a list, so
// the next root-level TypeScript file is covered without anyone remembering to add
// it. Nothing outside `ts-dist/src` reaches `dist`, so this does not widen what we
// publish.
"include": ["src", "*.ts", "*.mts", "*.cts"],
"exclude": [
"src/prototypes",
"src/vendor/highlight/demo/samples",
"src/tokens",
"src/compiled"
]
}