tsconfig: Organize and sort options consistently.

Organize and sort the options in tsconfig.json according to the way
they’re listed at https://www.typescriptlang.org/tsconfig/.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-06-09 10:59:42 -07:00 committed by Anders Kaseorg
parent 2274716c44
commit 56753edbcd
2 changed files with 37 additions and 40 deletions

View File

@ -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",
],
}

View File

@ -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"],
}