summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2024-09-06 19:23:59 +0900
committerGitHub <noreply@github.com>2024-09-06 12:23:59 +0200
commit8ef08f1d294dbe7e3771202084ecbede73ca28aa (patch)
tree8930e11abd8027129873acc0ca2c67fe0bfadb28 /cli
parent56363e4f4e097eadc85f5219e9e08c7ffc059e31 (diff)
feat(lsp): turn on useUnknownInCatchVariables (#25474)
Diffstat (limited to 'cli')
-rw-r--r--cli/lsp/config.rs1
-rw-r--r--cli/schemas/config-file.v1.json2
-rw-r--r--cli/tsc/99_main_compiler.js1
3 files changed, 1 insertions, 3 deletions
diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs
index fcea96aa5..c9729a5e5 100644
--- a/cli/lsp/config.rs
+++ b/cli/lsp/config.rs
@@ -1084,7 +1084,6 @@ impl Default for LspTsConfig {
"strict": true,
"target": "esnext",
"useDefineForClassFields": true,
- "useUnknownInCatchVariables": false,
"jsx": "react",
"jsxFactory": "React.createElement",
"jsxFragmentFactory": "React.Fragment",
diff --git a/cli/schemas/config-file.v1.json b/cli/schemas/config-file.v1.json
index df8177af2..d0dc27e75 100644
--- a/cli/schemas/config-file.v1.json
+++ b/cli/schemas/config-file.v1.json
@@ -223,7 +223,7 @@
"useUnknownInCatchVariables": {
"description": "Default catch clause variables as `unknown` instead of `any`.",
"type": "boolean",
- "default": false,
+ "default": true,
"markdownDescription": "Default catch clause variables as `unknown` instead of `any`.\n\nSee more: https://www.typescriptlang.org/tsconfig#useUnknownInCatchVariables"
}
}
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js
index f35fa7b5d..4044c5fc1 100644
--- a/cli/tsc/99_main_compiler.js
+++ b/cli/tsc/99_main_compiler.js
@@ -1152,7 +1152,6 @@ delete Object.prototype.__proto__;
"strict": true,
"target": "esnext",
"useDefineForClassFields": true,
- "useUnknownInCatchVariables": false,
"jsx": "react",
"jsxFactory": "React.createElement",
"jsxFragmentFactory": "React.Fragment",