mirror-cockpit-project-cockpit/tsconfig.json
Allison Karlitskaya d024d2dfbd tsconfig: switch target to es2020
This is the base level of the language that the compiler targets (or
understands).  We're about to add some code which uses `#private`
instance variables, which is a es2017 feature.  We already depend on
es2020 library features, so let's allow the same for the core language.

This has a side-effect: setting `target: 'es2020'` changes the default
module resolution approach.  Force it back to `"node"` so we can still
find our `node_modules`.
2024-06-21 19:01:17 +02:00

31 lines
820 B
JSON

/*
* Config for `tsc` and `tsserver`, currently only used for typechecking.
* Our main build is via `esbuild` which can handle `.ts`, but doesn't do any
* checking on its own. To typecheck, run `tsc`.
*
* Extended JSON — comments and trailing commas are good here.
*/
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"baseUrl": "./pkg/lib",
"esModuleInterop": true,
"exactOptionalPropertyTypes": true,
"jsx": "react",
"lib": [
"dom",
"es2020"
],
"moduleResolution": "node",
"noEmit": true, // we only use `tsc` for type checking
"skipLibCheck": true, // don't check node_modules
"strict": true,
"target": "es2020",
},
"include": [
"pkg/**/*"
],
}