From c34bbb2e3fcaaadd8dfb5e75d545acee1c3cfd1b Mon Sep 17 00:00:00 2001 From: Risu <79110363+risu729@users.noreply.github.com> Date: Sat, 17 Feb 2024 15:19:31 +0900 Subject: [PATCH] fix: organize tsconfig (#8654) * fix: organize tsconfig * fix: remove unnecessary comments in tsconfig * docs: revert changes on comments and md text * docs: fix case --- docs/guides/runtime/typescript.md | 7 +++---- docs/typescript.md | 7 +++---- src/cli/tsconfig-for-init.json | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/guides/runtime/typescript.md b/docs/guides/runtime/typescript.md index bb0ce14092..91f8af403a 100644 --- a/docs/guides/runtime/typescript.md +++ b/docs/guides/runtime/typescript.md @@ -15,7 +15,7 @@ Below is the full set of recommended `compilerOptions` for a Bun project. With t ```jsonc { "compilerOptions": { - // enable latest features + // Enable latest features "lib": ["ESNext"], "target": "ESNext", "module": "ESNext", @@ -32,12 +32,11 @@ Below is the full set of recommended `compilerOptions` for a Bun project. With t // Best practices "strict": true, "skipLibCheck": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, // Some stricter flags - "useUnknownInCatchVariables": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "noPropertyAccessFromIndexSignature": true } } diff --git a/docs/typescript.md b/docs/typescript.md index 92d93d0a24..65c8f68985 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -17,7 +17,7 @@ Bun supports things like top-level await, JSX, and extensioned `.ts` imports, wh ```jsonc { "compilerOptions": { - // enable latest features + // Enable latest features "lib": ["ESNext"], "target": "ESNext", "module": "ESNext", @@ -34,12 +34,11 @@ Bun supports things like top-level await, JSX, and extensioned `.ts` imports, wh // Best practices "strict": true, "skipLibCheck": true, - "noUnusedLocals": true, - "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, // Some stricter flags - "useUnknownInCatchVariables": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "noPropertyAccessFromIndexSignature": true } } diff --git a/src/cli/tsconfig-for-init.json b/src/cli/tsconfig-for-init.json index dcd8fc5119..e7130782d0 100644 --- a/src/cli/tsconfig-for-init.json +++ b/src/cli/tsconfig-for-init.json @@ -14,9 +14,8 @@ "noEmit": true, /* Linting */ - "skipLibCheck": true, "strict": true, + "skipLibCheck": true, "noFallthroughCasesInSwitch": true, - "forceConsistentCasingInFileNames": true } }