Skip to content

Commit

Permalink
fix: organize tsconfig (#8654)
Browse files Browse the repository at this point in the history
* fix: organize tsconfig

* fix: remove unnecessary comments in tsconfig

* docs: revert changes on comments and md text

* docs: fix case
  • Loading branch information
risu729 authored Feb 17, 2024
1 parent f9b1230 commit c34bbb2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
7 changes: 3 additions & 4 deletions docs/guides/runtime/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
}
}
Expand Down
7 changes: 3 additions & 4 deletions docs/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/cli/tsconfig-for-init.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
"noEmit": true,

/* Linting */
"skipLibCheck": true,
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true
}
}

0 comments on commit c34bbb2

Please # to comment.