From a3cd6d21e6638e37d0ed308e3d5c6bd4067f4284 Mon Sep 17 00:00:00 2001 From: risu729 <79110363+risu729@users.noreply.github.com> Date: Sun, 18 Feb 2024 01:42:28 +0900 Subject: [PATCH] Update @tsconfig/bun to reflect changes on bun docs --- bases/bun.json | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/bases/bun.json b/bases/bun.json index 911a24a..dd38be7 100644 --- a/bases/bun.json +++ b/bases/bun.json @@ -1,29 +1,32 @@ { - // This is based on https://bun.sh/docs/runtime/typescript#recommended-compileroptions + // This is based on https://bun.sh/docs/typescript#suggested-compileroptions "$schema": "https://json.schemastore.org/tsconfig", "display": "Bun", - "docs": "https://bun.sh/docs/runtime/typescript", + "docs": "https://bun.sh/docs/typescript", "compilerOptions": { - // enable latest features - "lib": [ - "ESNext" - ], - "module": "esnext", - "target": "esnext", + // Enable latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, - // if TS 5.x+ + // Bundler mode "moduleResolution": "bundler", - "noEmit": true, "allowImportingTsExtensions": true, - "moduleDetection": "force", - - // support JSX - "jsx": "react-jsx", + "verbatimModuleSyntax": true, + "noEmit": true, - // best practices + // Best practices "strict": true, - "forceConsistentCasingInFileNames": true, - "skipLibCheck": true + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + + // Some stricter flags + "noUnusedLocals": true, + "noUnusedParameters": true, + "noPropertyAccessFromIndexSignature": true } }