1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-17 16:12:39 +02:00

tests: fix the includes in test/tsconfig.json and switch to modern node18 module (#2740)

- typescript checking was not properly working before in src/ directory
- https://www.typescriptlang.org/tsconfig/#node16node18nodenext: node18
is the up-to-date module. This picks the module resolution "node16"
- https://www.typescriptlang.org/tsconfig/#moduleResolution recommends
not using node (node10) in modern code
- Update target to ES2024
This commit is contained in:
michael-kerscher 2025-05-07 09:22:16 +02:00 committed by GitHub
parent 03df73e747
commit ce9d74742d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,11 +1,15 @@
{ {
"compilerOptions": { "compilerOptions": {
"moduleResolution": "node", // This implicitly sets moduleResolution to "node16"
"module": "ESNext", // https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution-is-host-defined
"target": "es2022", "module": "Node18",
"target": "ES2024",
"lib": [ "lib": [
"es2022", // https://www.typescriptlang.org/tsconfig/#lib
"dom" // include APIs that are enabled by ES2024
"ES2024",
// DOM definitions, window, document, etc.
"DOM"
], ],
"types": [ "types": [
"node", "node",
@ -24,7 +28,7 @@
"noFallthroughCasesInSwitch": true "noFallthroughCasesInSwitch": true
}, },
"include": [ "include": [
"test", "src/**/*.ts",
"wdio.conf.ts" "wdio.conf.ts"
] ]
} }