-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Update tsconfig.json #16703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Update tsconfig.json #16703
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThe build process for the Changes
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/ai/tsconfig.json (1)
15-18
: Ensuretsc-alias
is wired into your build pipeline
You’ve added thetsc-alias
configuration correctly, but this block will be ignored unless:
tsc-alias
is installed indevDependencies
.- Your build (or postbuild) script invokes
tsc-alias
aftertsc
.Please verify that
packages/ai/package.json
has something like:"devDependencies": { "tsc-alias": "^1.8.0" }, "scripts": { "build": "tsc && tsc-alias" }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
packages/ai/tsconfig.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
packages/ai/package.json
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Lint Code Base
🔇 Additional comments (2)
packages/ai/package.json (2)
31-32
: Confirm and document new devDependencyopenai
The PR adds bothopenai
andtsc-alias
underdevDependencies
. Whiletsc-alias
is correctly categorized, please clarify in the PR description:
- Why
openai
was added.- If
openai
is required at runtime, move it todependencies
so it’s installed in production.Likely an incorrect or invalid review comment.
32-32
: Approve addition oftsc-alias
devDependency
Aligns with the updatedtsconfig.json
alias configuration and ensures path imports are correctly rewritten after compilation.
@@ -19,7 +19,7 @@ | |||
"access": "public" | |||
}, | |||
"scripts": { | |||
"build": "tsc" | |||
"build": "tsc || echo 'tsc failed, continuing anyway' && tsc-alias" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise critical concern: suppressing TypeScript errors masks build failures
By using tsc || echo 'tsc failed, continuing anyway' && tsc-alias
, all type-checking errors are hidden, potentially leading to shipping broken code. If the goal is to always run tsc-alias
, consider:
- Splitting into
"build": "tsc && npm run postbuild"
and"postbuild": "tsc-alias"
to preserve failure on errors. - Or adjusting
tsconfig.json
(e.g., disablingnoEmitOnError
) instead of ignoring alltsc
failures.
🤖 Prompt for AI Agents
In packages/ai/package.json at line 22, the build script suppresses TypeScript
errors by using 'tsc || echo ... && tsc-alias', which hides build failures. To
fix this, split the build script into two separate scripts: set "build" to run
'tsc' and then, only if successful, run a new "postbuild" script that executes
'tsc-alias'. This preserves error detection while ensuring tsc-alias runs after
a successful build. Alternatively, adjust tsconfig.json to disable
'noEmitOnError' if you want to allow emitting despite errors without suppressing
them in the script.
WHY
Summary by CodeRabbit