chore(tsconfig): add per-integration TypeScript configuration files#113
chore(tsconfig): add per-integration TypeScript configuration files#113halvaradop wants to merge 2 commits intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
📝 WalkthroughWalkthroughThis PR consolidates TypeScript configurations by creating shared presets in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/nextjs/app-router/tsconfig.json (1)
13-22:⚠️ Potential issue | 🟡 MinorRemove duplicate include entries.
Lines 20 and 21 contain identical entries (
.next\\dev/types/**/*.ts). This appears to be a copy-paste mistake and should be deduplicated.🔧 Proposed fix
"include": [ "next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts", - "**/*.mts", - ".next\\dev/types/**/*.ts", - ".next\\dev/types/**/*.ts" + "**/*.mts" ],🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/nextjs/app-router/tsconfig.json` around lines 13 - 22, The "include" array in tsconfig currently contains a duplicated entry ".next\\dev/types/**/*.ts"; remove the duplicate so only one ".next\\dev/types/**/*.ts" remains in the "include" array (or replace both with a single normalized path like ".next/dev/types/**/*.ts" if you prefer forward slashes), editing the "include" array entry in apps/nextjs/app-router/tsconfig.json to dedupe the repeated value.
🧹 Nitpick comments (3)
configs/tsconfig/bun.json (1)
1-15: Configuration looks good; minor redundancy noted.The Bun-specific configuration is well-suited for the runtime. One minor observation:
noFallthroughCasesInSwitchis already enabled intsconfig.base.json(which this extends), making line 11 redundant. Consider removing it to keep the preset minimal.♻️ Optional cleanup
"verbatimModuleSyntax": true, "noEmit": true, - "noFallthroughCasesInSwitch": true, "noUncheckedIndexedAccess": true, "noImplicitOverride": true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@configs/tsconfig/bun.json` around lines 1 - 15, Remove the redundant compiler option by deleting "noFallthroughCasesInSwitch" from the bun-specific tsconfig (it is already enabled in tsconfig.base.json), leaving the rest of the "compilerOptions" intact in the bun configuration so it inherits the base setting.apps/tanstack-start/tsconfig.json (1)
4-4: Let the shared preset ownmodule.
configs/tsconfig/tanstack.json:1-12already sets"module": "ESNext", so Line 4 reintroduces duplication that this preset split is meant to remove.Suggested cleanup
"compilerOptions": { - "module": "ESNext", "types": ["vite/client"], "baseUrl": ".",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/tanstack-start/tsconfig.json` at line 4, Remove the duplicated "module": "ESNext" entry from the local tsconfig (apps/tanstack-start/tsconfig.json) so the shared preset (configs/tsconfig/tanstack.json) owns that setting; locate the "module" key in the tsconfig used by the tanstack-start project and delete that line so the project inherits the value from the shared tanstack preset.apps/cloudflare/tsconfig.json (1)
4-4: Remove the local declaration file fromtypes.
worker-configuration.d.tsis already included at Line 7.compilerOptions.typesis documented as a whitelist of type packages added to the global scope, so keeping a project file path here is unnecessary and makes the config harder to read. Leave the local.d.tsininclude/filesand keep only package names intypes. (typescriptlang.org)Suggested cleanup
"compilerOptions": { - "types": ["./worker-configuration.d.ts", "node"] + "types": ["node"] },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/cloudflare/tsconfig.json` at line 4, Remove the local declaration file from the compilerOptions.types array: delete "worker-configuration.d.ts" from the "types" list and leave only package names (e.g., "node"), while keeping the local worker-configuration.d.ts referenced via "include" or "files"; this ensures compilerOptions.types is used as a whitelist of global type packages and the local .d.ts remains available through the include/files settings.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/bun/package.json`:
- Around line 13-15: The package.json currently lists "@aura-stack/tsconfig"
under dependencies; move "@aura-stack/tsconfig" from the dependencies section
into devDependencies so it is treated as a build-time-only dependency; update
the dependencies and devDependencies objects accordingly, ensuring
"@aura-stack/auth" remains in dependencies and "@aura-stack/tsconfig" appears
under devDependencies.
In `@apps/cloudflare/package.json`:
- Around line 16-19: The package.json currently lists "@aura-stack/tsconfig"
under "dependencies"; move that package into "devDependencies" instead so it's
treated as a build-time/dev-only dependency (leave "@aura-stack/auth" in
"dependencies"). Update the JSON keys in apps/cloudflare's package.json by
removing the "@aura-stack/tsconfig" entry from "dependencies" and adding the
same name and version ("workspace:*") under "devDependencies" to match apps/bun
and the rest of the repo.
In `@configs/tsconfig/react-router.json`:
- Around line 1-10: This config is missing an "extends" clause so it doesn't
inherit the strict compiler settings from the base; update
configs/tsconfig/react-router.json to add an "extends": "./tsconfig.base.json"
top-level property so the base's strict flags (strict, strictNullChecks,
noImplicitAny, noFallthroughCasesInSwitch, etc.) are inherited, and keep only
overrides inside "compilerOptions" (do not re-declare strict-related flags in
compilerOptions unless intentionally overriding them).
In `@configs/tsconfig/worker.json`:
- Around line 1-10: Add an "extends" clause so this tsconfig inherits strict
settings from the base config: update the root object in the config (the one
containing "compilerOptions") to include "extends": "./tsconfig.base.json" while
keeping the existing "compilerOptions" entries; this ensures settings like
strictFunctionTypes and noFallthroughCasesInSwitch from the base are applied to
the worker preset.
---
Outside diff comments:
In `@apps/nextjs/app-router/tsconfig.json`:
- Around line 13-22: The "include" array in tsconfig currently contains a
duplicated entry ".next\\dev/types/**/*.ts"; remove the duplicate so only one
".next\\dev/types/**/*.ts" remains in the "include" array (or replace both with
a single normalized path like ".next/dev/types/**/*.ts" if you prefer forward
slashes), editing the "include" array entry in
apps/nextjs/app-router/tsconfig.json to dedupe the repeated value.
---
Nitpick comments:
In `@apps/cloudflare/tsconfig.json`:
- Line 4: Remove the local declaration file from the compilerOptions.types
array: delete "worker-configuration.d.ts" from the "types" list and leave only
package names (e.g., "node"), while keeping the local worker-configuration.d.ts
referenced via "include" or "files"; this ensures compilerOptions.types is used
as a whitelist of global type packages and the local .d.ts remains available
through the include/files settings.
In `@apps/tanstack-start/tsconfig.json`:
- Line 4: Remove the duplicated "module": "ESNext" entry from the local tsconfig
(apps/tanstack-start/tsconfig.json) so the shared preset
(configs/tsconfig/tanstack.json) owns that setting; locate the "module" key in
the tsconfig used by the tanstack-start project and delete that line so the
project inherits the value from the shared tanstack preset.
In `@configs/tsconfig/bun.json`:
- Around line 1-15: Remove the redundant compiler option by deleting
"noFallthroughCasesInSwitch" from the bun-specific tsconfig (it is already
enabled in tsconfig.base.json), leaving the rest of the "compilerOptions" intact
in the bun configuration so it inherits the base setting.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 50021d46-d655-4dea-920b-84908cb63fcc
⛔ Files ignored due to path filters (2)
bun.lockis excluded by!**/*.lockpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (21)
apps/bun/package.jsonapps/bun/src/auth.tsapps/bun/tsconfig.jsonapps/cloudflare/package.jsonapps/cloudflare/tsconfig.jsonapps/elysia/tsconfig.jsonapps/hono/tsconfig.jsonapps/nextjs/app-router/package.jsonapps/nextjs/app-router/tsconfig.jsonapps/nextjs/pages-router/package.jsonapps/nextjs/pages-router/tsconfig.jsonapps/react-router/package.jsonapps/react-router/tsconfig.jsonapps/tanstack-start/package.jsonapps/tanstack-start/tsconfig.jsonconfigs/tsconfig/bun.jsonconfigs/tsconfig/next.jsonconfigs/tsconfig/react-router.jsonconfigs/tsconfig/tanstack.jsonconfigs/tsconfig/tsconfig.base.jsonconfigs/tsconfig/worker.json
| "@aura-stack/auth": "workspace:*", | ||
| "@aura-stack/tsconfig": "workspace:*" | ||
| }, |
There was a problem hiding this comment.
Move @aura-stack/tsconfig to devDependencies.
@aura-stack/tsconfig is a build-time TypeScript configuration package that should be in devDependencies, not dependencies. Other apps in this PR (react-router, tanstack-start) correctly place it in devDependencies.
🔧 Proposed fix
"dependencies": {
- "@aura-stack/auth": "workspace:*",
- "@aura-stack/tsconfig": "workspace:*"
+ "@aura-stack/auth": "workspace:*"
},
"devDependencies": {
+ "@aura-stack/tsconfig": "workspace:*",
"@types/bun": "^1.3.9"
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "@aura-stack/auth": "workspace:*", | |
| "@aura-stack/tsconfig": "workspace:*" | |
| }, | |
| "dependencies": { | |
| "@aura-stack/auth": "workspace:*" | |
| }, | |
| "devDependencies": { | |
| "@aura-stack/tsconfig": "workspace:*", | |
| "@types/bun": "^1.3.9" | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/bun/package.json` around lines 13 - 15, The package.json currently lists
"@aura-stack/tsconfig" under dependencies; move "@aura-stack/tsconfig" from the
dependencies section into devDependencies so it is treated as a build-time-only
dependency; update the dependencies and devDependencies objects accordingly,
ensuring "@aura-stack/auth" remains in dependencies and "@aura-stack/tsconfig"
appears under devDependencies.
| "dependencies": { | ||
| "@aura-stack/auth": "workspace:*" | ||
| "@aura-stack/auth": "workspace:*", | ||
| "@aura-stack/tsconfig": "workspace:*" | ||
| }, |
There was a problem hiding this comment.
Move @aura-stack/tsconfig to devDependencies.
Same issue as apps/bun/package.json — the tsconfig package is a build-time dependency and should be in devDependencies for consistency with other apps.
🔧 Proposed fix
"dependencies": {
- "@aura-stack/auth": "workspace:*",
- "@aura-stack/tsconfig": "workspace:*"
+ "@aura-stack/auth": "workspace:*"
},
"devDependencies": {
+ "@aura-stack/tsconfig": "workspace:*",
"@cloudflare/vitest-pool-workers": "^0.12.4",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "dependencies": { | |
| "@aura-stack/auth": "workspace:*" | |
| "@aura-stack/auth": "workspace:*", | |
| "@aura-stack/tsconfig": "workspace:*" | |
| }, | |
| "dependencies": { | |
| "@aura-stack/auth": "workspace:*" | |
| }, | |
| "devDependencies": { | |
| "@aura-stack/tsconfig": "workspace:*", | |
| "@cloudflare/vitest-pool-workers": "^0.12.4", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/cloudflare/package.json` around lines 16 - 19, The package.json
currently lists "@aura-stack/tsconfig" under "dependencies"; move that package
into "devDependencies" instead so it's treated as a build-time/dev-only
dependency (leave "@aura-stack/auth" in "dependencies"). Update the JSON keys in
apps/cloudflare's package.json by removing the "@aura-stack/tsconfig" entry from
"dependencies" and adding the same name and version ("workspace:*") under
"devDependencies" to match apps/bun and the rest of the repo.
| { | ||
| "compilerOptions": { | ||
| "target": "ES2022", | ||
| "module": "ES2022", | ||
| "moduleResolution": "bundler", | ||
| "jsx": "react-jsx", | ||
| "verbatimModuleSyntax": true, | ||
| "noEmit": true | ||
| } | ||
| } |
There was a problem hiding this comment.
Missing extends clause results in loss of strict type-checking.
Unlike next.json which extends ./tsconfig.base.json, this config is standalone. Apps using this preset will lose critical strict-mode settings (strict, strictNullChecks, noImplicitAny, noFallthroughCasesInSwitch, etc.) that are defined in the base config.
🔧 Proposed fix to extend the base config
{
+ "extends": "./tsconfig.base.json",
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"verbatimModuleSyntax": true,
"noEmit": true
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "compilerOptions": { | |
| "target": "ES2022", | |
| "module": "ES2022", | |
| "moduleResolution": "bundler", | |
| "jsx": "react-jsx", | |
| "verbatimModuleSyntax": true, | |
| "noEmit": true | |
| } | |
| } | |
| { | |
| "extends": "./tsconfig.base.json", | |
| "compilerOptions": { | |
| "target": "ES2022", | |
| "module": "ES2022", | |
| "moduleResolution": "bundler", | |
| "jsx": "react-jsx", | |
| "verbatimModuleSyntax": true, | |
| "noEmit": true | |
| } | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@configs/tsconfig/react-router.json` around lines 1 - 10, This config is
missing an "extends" clause so it doesn't inherit the strict compiler settings
from the base; update configs/tsconfig/react-router.json to add an "extends":
"./tsconfig.base.json" top-level property so the base's strict flags (strict,
strictNullChecks, noImplicitAny, noFallthroughCasesInSwitch, etc.) are
inherited, and keep only overrides inside "compilerOptions" (do not re-declare
strict-related flags in compilerOptions unless intentionally overriding them).
| { | ||
| "compilerOptions": { | ||
| "target": "ES2024", | ||
| "lib": ["ES2024", "WebWorker"], | ||
| "jsx": "react-jsx", | ||
| "module": "ES2022", | ||
| "moduleResolution": "bundler", | ||
| "noEmit": true | ||
| } | ||
| } |
There was a problem hiding this comment.
Missing extends clause loses strict type-checking settings.
This config does not extend ./tsconfig.base.json. As noted in the context snippet, the base config defines strictFunctionTypes: true, noFallthroughCasesInSwitch: true, and other strict settings. Apps using this worker preset (e.g., apps/cloudflare) will lose these guarantees.
🔧 Proposed fix to extend the base config
{
+ "extends": "./tsconfig.base.json",
"compilerOptions": {
"target": "ES2024",
"lib": ["ES2024", "WebWorker"],
"jsx": "react-jsx",
"module": "ES2022",
"moduleResolution": "bundler",
"noEmit": true
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "compilerOptions": { | |
| "target": "ES2024", | |
| "lib": ["ES2024", "WebWorker"], | |
| "jsx": "react-jsx", | |
| "module": "ES2022", | |
| "moduleResolution": "bundler", | |
| "noEmit": true | |
| } | |
| } | |
| { | |
| "extends": "./tsconfig.base.json", | |
| "compilerOptions": { | |
| "target": "ES2024", | |
| "lib": ["ES2024", "WebWorker"], | |
| "jsx": "react-jsx", | |
| "module": "ES2022", | |
| "moduleResolution": "bundler", | |
| "noEmit": true | |
| } | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@configs/tsconfig/worker.json` around lines 1 - 10, Add an "extends" clause so
this tsconfig inherits strict settings from the base config: update the root
object in the config (the one containing "compilerOptions") to include
"extends": "./tsconfig.base.json" while keeping the existing "compilerOptions"
entries; this ensures settings like strictFunctionTypes and
noFallthroughCasesInSwitch from the base are applied to the worker preset.
Description
// @ignore-error
Summary by CodeRabbit
@aura-stack/authfrom dev to production dependencies in applicable apps.