diff --git a/.gitattributes b/.gitattributes index a06cb7dcd2..50f21bf12f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -54,3 +54,4 @@ test/js/node/test/common linguist-vendored test/js/bun/css/files linguist-vendored .vscode/*.json linguist-language=JSON-with-Comments +src/cli/init/tsconfig.default.json linguist-language=JSON-with-Comments \ No newline at end of file diff --git a/bench/express/tsconfig.json b/bench/express/tsconfig.json index 0fef23a368..145fa42809 100644 --- a/bench/express/tsconfig.json +++ b/bench/express/tsconfig.json @@ -3,7 +3,7 @@ // Enable latest features "lib": ["ESNext"], "target": "ESNext", - "module": "ESNext", + "module": "Preserve", "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, diff --git a/bench/postgres/tsconfig.json b/bench/postgres/tsconfig.json index 0fef23a368..145fa42809 100644 --- a/bench/postgres/tsconfig.json +++ b/bench/postgres/tsconfig.json @@ -3,7 +3,7 @@ // Enable latest features "lib": ["ESNext"], "target": "ESNext", - "module": "ESNext", + "module": "Preserve", "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, diff --git a/docs/guides/runtime/typescript.md b/docs/guides/runtime/typescript.md index c6ce400981..7afa2fdaef 100644 --- a/docs/guides/runtime/typescript.md +++ b/docs/guides/runtime/typescript.md @@ -18,7 +18,7 @@ Below is the full set of recommended `compilerOptions` for a Bun project. With t // Environment setup & latest features "lib": ["ESNext"], "target": "ESNext", - "module": "ESNext", + "module": "Preserve", "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, @@ -34,6 +34,7 @@ Below is the full set of recommended `compilerOptions` for a Bun project. With t "skipLibCheck": true, "noFallthroughCasesInSwitch": true, "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, // Some stricter flags (disabled by default) "noUnusedLocals": false, diff --git a/docs/quickstart.md b/docs/quickstart.md index 6e151b3fef..276dbc1932 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -58,7 +58,7 @@ Then add the following to your `compilerOptions` in `tsconfig.json`: "compilerOptions": { "lib": ["ESNext"], "target": "ESNext", - "module": "ESNext", + "module": "Preserve", "moduleDetection": "force", "moduleResolution": "bundler", "allowImportingTsExtensions": true, diff --git a/docs/typescript.md b/docs/typescript.md index 71b38ea601..4c99e30fdd 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -20,7 +20,7 @@ Bun supports things like top-level await, JSX, and extensioned `.ts` imports, wh // Environment setup & latest features "lib": ["ESNext"], "target": "ESNext", - "module": "ESNext", + "module": "Preserve", "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, @@ -36,6 +36,7 @@ Bun supports things like top-level await, JSX, and extensioned `.ts` imports, wh "skipLibCheck": true, "noFallthroughCasesInSwitch": true, "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, // Some stricter flags (disabled by default) "noUnusedLocals": false, diff --git a/src/cli/init/tsconfig.default.json b/src/cli/init/tsconfig.default.json index 9c62f74b91..bfa0fead54 100644 --- a/src/cli/init/tsconfig.default.json +++ b/src/cli/init/tsconfig.default.json @@ -3,7 +3,7 @@ // Environment setup & latest features "lib": ["ESNext"], "target": "ESNext", - "module": "ESNext", + "module": "Preserve", "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, @@ -19,6 +19,7 @@ "skipLibCheck": true, "noFallthroughCasesInSwitch": true, "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, // Some stricter flags (disabled by default) "noUnusedLocals": false, diff --git a/src/init/react-app/tsconfig.json b/src/init/react-app/tsconfig.json index 83b22278e3..5aafbe91d3 100644 --- a/src/init/react-app/tsconfig.json +++ b/src/init/react-app/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "ESNext", - "module": "ESNext", + "module": "Preserve", "moduleResolution": "bundler", "jsx": "react-jsx", "allowJs": true, diff --git a/src/init/react-shadcn/tsconfig.json b/src/init/react-shadcn/tsconfig.json index 4d2394e8eb..bad7636621 100644 --- a/src/init/react-shadcn/tsconfig.json +++ b/src/init/react-shadcn/tsconfig.json @@ -5,7 +5,7 @@ // Bundler mode "moduleResolution": "bundler", - "module": "preserve", + "module": "Preserve", "allowImportingTsExtensions": true, "verbatimModuleSyntax": true, "noEmit": true, diff --git a/src/init/react-tailwind/tsconfig.json b/src/init/react-tailwind/tsconfig.json index 83b22278e3..5aafbe91d3 100644 --- a/src/init/react-tailwind/tsconfig.json +++ b/src/init/react-tailwind/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "ESNext", - "module": "ESNext", + "module": "Preserve", "moduleResolution": "bundler", "jsx": "react-jsx", "allowJs": true,