diff --git a/tsconfig.json b/tsconfig.json index 2654700d81..51e4c368b6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,48 +1,45 @@ { "compilerOptions": { + /* Type Checking */ + "exactOptionalPropertyTypes": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "strict": true, + + /* Modules */ + "moduleResolution": "node", "paths": { "*": ["./web/src/types/*"], }, + "resolveJsonModule": true, "types": ["@types/jquery.validation"], - /* TypeScript 3.4 added the --incremental flag but its API is not - * currently public so ts-loader cannot use it yet. - * Tracking issue: https://github.com/microsoft/TypeScript/issues/29978 - */ - // "incremental": true, - - /* Basic options */ + /* Emit */ "noEmit": true, - "target": "ESNext", - "esModuleInterop": true, - "moduleResolution": "node", - "resolveJsonModule": true, - /* Strict type-checking */ - "strict": true, - "exactOptionalPropertyTypes": true, + /* Interop Constraints */ + "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "isolatedModules": true, - "noImplicitOverride": true, - "noUncheckedIndexedAccess": true, - /* Additional checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, + /* Language and Environment */ + "target": "ESNext", }, "exclude": [ - /* Type stubs are not part of the top-level project. */ + // Type stubs are not part of the top-level project. "web/src/types", - /* Skip walking large generated directories. */ + // Skip walking large generated directories. "docs/_build", "static/webpack-bundles", "var", "zulip-py3-venv", - /* Even though allowJs defaults to false, typescript-eslint forces it to true. */ + // Even though allowJs defaults to false, typescript-eslint forces it to true. "**/*.js", ], } diff --git a/web/shared/tsconfig.json b/web/shared/tsconfig.json index 22da0f8de4..cdec0229f8 100644 --- a/web/shared/tsconfig.json +++ b/web/shared/tsconfig.json @@ -1,32 +1,32 @@ { "compilerOptions": { - /* Language and Environment */ - "target": "esnext", + /* Type Checking */ + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "strict": true, /* Modules */ - "rootDir": "src", "moduleResolution": "node", + "rootDir": "src", + + /* Emit */ + "declaration": true, + "outDir": "lib", + "sourceMap": true, /* JavaScript Support */ "allowJs": true, - /* Emit */ - "declaration": true, - "sourceMap": true, - "outDir": "lib", - /* Interop Constraints */ - "isolatedModules": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, + "isolatedModules": true, - /* Type Checking */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noImplicitOverride": true, + /* Language and Environment */ + "target": "esnext", }, "include": ["src"], }