Update tsconfig to align with latest browser usage

- Added the target : es2021 option because least browser support is safari 14.
- Added the dom.iterable option in order for the spread operator to work on DOM elements.
- Added the "strictPropertyInitialization": true option. This ensures that any class constructor property that is declared must be initialized or set.
- Added the "forceConsistentCasingInFileNames": true option to ensure that different filesystem renaming issues will be flagged early
- Re-order the config to be alphabetical
pull/9779/head
Lovelyfin00 2022-12-07 14:53:46 +01:00 zatwierdzone przez LB (Ben Johnston)
rodzic 6997ff1d68
commit 8e2e66bef0
1 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -1,14 +1,18 @@
{
"compilerOptions": {
"allowJs": true,
"downlevelIteration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": ["es2015", "dom"],
"lib": ["DOM", "DOM.iterable"],
"moduleResolution": "node",
"noImplicitAny": false, // TODO: Enable once all existing code is typed
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true,
"esModuleInterop": true,
"allowJs": true,
"downlevelIteration": true
"strictPropertyInitialization": true, // Requires `--strictNullChecks` be enabled in order to take effect
"target": "ES2021" // Since lowest browser support is for Safari 14
},
"files": [
"client/src/index.ts",