-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.json
162 lines (162 loc) · 7.25 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
"compilerOptions": {
"target": "ES2020",
"lib": [
"DOM",
"DOM.Iterable",
"ES2022",
],
"module": "ESNext",
"useDefineForClassFields": true,
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
// "jsx": "preserve", // jsx was set to preserve (next.js implements its own optimized jsx transform)
// "incremental": true,
/* Linting */
"strict": true,
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
// "noUnusedLocals": true,
// "noUnusedParameters": true,
//
"esModuleInterop": true,
"allowSyntheticDefaultImports": true, // Jest needs this...
//
"experimentalDecorators": true,
// "emitDecoratorMetadata": true, // <see [ResolveCircularDependenyWhenPlainToClass.spec.ts][ReferenceError: Cannot access 'Photo' before initialization][https://github.com/typestack/class-transformer/issues/1622][https://stackoverflow.com/questions/56870661/angular-7-2-1-es6-class-referenceerror-cannot-access-x-before-initializatio]>
//
"sourceMap": true,
//
// "rootDir": ".",
"outDir": "dist",
//
"allowJs": true, // false, // try for intellisense speed
//
"noErrorTruncation": true, // https://stackoverflow.com/questions/53113031/how-to-see-a-fully-expanded-typescript-type-without-n-more-and
// >" Error
// The inferred type of 'counterSlice' cannot be named without a reference to '.pnpm/immer@9.0.21/node_modules/immer/dist/internal.js'. This is likely not portable. A type annotation is necessary.ts(2742)
// https://stackoverflow.com/questions/54525342/error-ts2742-the-inferred-type-of-username-cannot-be-named-without-a-referenc
// "composite": true,
// "declaration": true,
// "declarationMap": true,
//
"plugins": [
// {
// "name": "next"
// },
{
"name": "typescript-plugin-css-modules"
},
],
},
"include": [
"src/**/*",
"test/**/*",
"Globals.d.ts",
// npx jest doesnt need these, dk why; but seems vscode ext ui need? no ;not_working;
"vite.config.ts",
// "jest.config.ts",
"jest.config.js",
// "jest.setupFiles.ts",
// "jest.setupFilesAfterEnv.ts",
"babel.config.js",
"config/**/*",
"__mocks__/**/*",
"env.d.ts",
// "node_modules/@prisma/client/**/*"
// ;working; "./src/**/*",
// ;not_working; "/h:/Using/TLightChat/tlightchat-main/src/**/*",
// ;not_working; "/h/Using/TLightChat/tlightchat-main/src/**/*",
// ;not_working; "/Using/TLightChat/tlightchat-main/src/**/*",
// ... said glob is weird no_knowlres // File specification cannot end in a recursive directory wildcard ('**'): '/src/**'.ts
// ;not_working; "/src/**/*",
// ;not_working; "/src/**/*.@(ts|tsx|js|jsx|scss|css|cts|mts|cjs|mjs)",
// ;not_working; "/test/**/*.@(ts|tsx|js|jsx|scss|css|cts|mts|cjs|mjs)",
// ;not_working; "./src/**/*.{ts,tsx,js,jsx,scss,css,cts,mts,cjs,mjs}",
// ;not_working; "./test/**/*.{ts,tsx,js,jsx,scss,css,cts,mts,cjs,mjs}",
// "**/*.ts",
// "**/*.tsx",
// "next-env.d.ts",
// ".next/types/**/*.ts",
],
"exclude": [
"node_modules",
"**/node_modules/**/*",
// ".git/**/*",
// "coverage/**/*",
// ".next/**/*",
"*.del*",
// javascript - How to tell Vite to exclude a subset of files in a directory from build? - Stack Overflow
// https://stackoverflow.com/questions/75412767/how-to-tell-vite-to-exclude-a-subset-of-files-in-a-directory-from-build
// typescript - Running vite build using tsconfig.build.ts - Stack Overflow
// https://stackoverflow.com/questions/74359277/running-vite-build-using-tsconfig-build-ts
// javascript - Why does Vite create two TypeScript config files: tsconfig.json and tsconfig.node.json? - Stack Overflow
// https://stackoverflow.com/questions/72027949/why-does-vite-create-two-typescript-config-files-tsconfig-json-and-tsconfig-nod
"test/**/*", // @todo vite exclude folder from build
"__mocks__/**/*", // @todo vite exclude folder from build
// must exclude this.. otherwise
// // []
// // 12:15:05 AM: $ pnpm run vite:build
// // 12:15:05 AM: > tlightchat-main@0.0.0 vite:build /opt/build/repo
// // 12:15:05 AM: > tsc && vite build
// // 12:15:09 AM: __mocks__/RTCPeerConnection.ts(46,3): error TS2416: Property "createAnswer" in type "RTCPeerConnectionMock" is not assignable to the same property in base type "RTCPeerConnection".
// // <>
// // https://app.netlify.com/sites/precious-mermaid-f619e3/deploys/658d042e06910f6d8d48d08f
// "test/!(randomTest)/**/*", // @todo vite exclude folder from build // doesnt work for vite, but works for intellisense ...
// "node_modules/@prisma/client/node_modules/**/*"
],
"references": [
{
"path": "./tsconfig.node.json"
}
],
}
// vscode intellisense hang pb ... dk 5.2.2 5.3.3
//
// ;[import from root (unsolved)]; "plugins": [
// ;[import from root (unsolved)]; {
// ;[import from root (unsolved)]; "name": "babel-plugin-root-import",
// ;[import from root (unsolved)]; "options": {
// ;[import from root (unsolved)]; // "rootPathSuffix": "./",
// ;[import from root (unsolved)]; "rootPathPrefix": "~/"
// ;[import from root (unsolved)]; }
// ;[import from root (unsolved)]; }
// ;[import from root (unsolved)]; ],
// ;[import from root (unsolved)];
// ;[import from root (unsolved)]; []
// ;[import from root (unsolved)]; {
// ;[import from root (unsolved)]; "type" : "module",
// ;[import from root (unsolved)]; "imports": {
// ;[import from root (unsolved)]; "#root/*.js": "./*.js"
// ;[import from root (unsolved)]; }
// ;[import from root (unsolved)]; }
// ;[import from root (unsolved)]; <>
// ;[import from root (unsolved)]; https://stackoverflow.com/questions/75806206/how-to-import-javascript-files-in-nodejs-using-file-paths-from-project-root-in
// ;[import from root (unsolved)];
// ;[import from root (unsolved)]; []
// ;[import from root (unsolved)]; "compilerOptions": {
// ;[import from root (unsolved)]; "baseUrl": ".",
// ;[import from root (unsolved)]; "paths": {
// ;[import from root (unsolved)]; "#utils/*": ["./utils/*"],
// ;[import from root (unsolved)]; <>
// ;[import from root (unsolved)]; https://stackoverflow.com/questions/68268894/how-to-get-node-subpath-imports-intellisense-working
// ;[import from root (unsolved)]; doesnt work that well with type infer & .module.css
// ;[import from root (unsolved)];
// ;[import from root (unsolved)]; []
// ;[import from root (unsolved)]; [Here is the Plugin (tested and with a clear README)](https://github.com/michaelzoidl/babel-root-import)
// ;[import from root (unsolved)]; <>
// ;[import from root (unsolved)]; https://stackoverflow.com/questions/29755065/es6-import-from-root
// ;[import from root (unsolved)]; ~~~~// doesnt even work
// ;[import from root (unsolved)]; "baseUrl": "src",
// ;[import from root (unsolved)]; "baseUrl": ".",
// ;[import from root (unsolved)]; "paths": {
// ;[import from root (unsolved)]; "#src/*": [
// ;[import from root (unsolved)]; "./src/*"
// ;[import from root (unsolved)]; ]
// ;[import from root (unsolved)]; }