-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtsconfig.json
More file actions
71 lines (71 loc) · 2.44 KB
/
Copy pathtsconfig.json
File metadata and controls
71 lines (71 loc) · 2.44 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
67
68
69
70
71
{
"compilerOptions": {
"baseUrl": ".",
"ignoreDeprecations": "6.0",
"target": "ESNext",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": [
"./*"
],
"fumadocs-mdx:collections/*": [
".source/*"
]
}
},
// `typecheck` runs `next typegen` before tsc on purpose, and these two
// `.next` globs are why. Next writes both of them itself
// (`writeConfigurationDefaults`) and re-adds either one on the next
// `next dev` / `next build` if you delete it -- measured by running that
// routine against a narrowed copy of this file: the `dev` glob came
// straight back and the file was rewritten. This array cannot be narrowed,
// so the honesty has to come from the script instead.
//
// .next/types/** produced by the `next typegen` that the `typecheck`
// script now runs itself, so the checked program is a
// function of source rather than of whatever `.next` an
// earlier build happened to leave behind. A bare
// `tsc --noEmit` here passed over a broken route
// signature precisely because these files were absent.
// .next/dev/types/** written only by `next dev`. Next's own build-mode
// type check filters this directory OUT of the program
// (`getDevTypesPath`, lib/typescript/runTypeCheck.js)
// "to prevent stale dev types from causing errors when
// routes have been deleted since the last dev session".
// Plain tsc has no such filter, so a leftover dev
// session can only add a local false RED here, never a
// false green. Remedy: `rm -rf apps/docs/.next`.
//
// Do not reduce `typecheck` back to a bare `tsc --noEmit`.
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
".next/dev/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}