chore(tsconfig): remove tsconfig duplicates#5045
Conversation
🦋 Changeset detectedLatest commit: ddc1335 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The azure failure checks seems unrelated to the code changes since its only changes to the tsconfig files. |
There was a problem hiding this comment.
Pull request overview
This PR centralizes TypeScript configuration by removing per-package/app compilerOptions that duplicate settings already present in tsconfig.base.json, aiming to reduce drift and simplify maintenance across the monorepo.
Changes:
- Removed redundant
compilerOptionsfrom multiple package/apptsconfig*.jsonfiles in favor oftsconfig.base.json. - Adjusted TypeScript build/test tsconfigs to rely on base settings (e.g.,
declaration*,incremental,noEmit, interop-related options). - Added a changeset bumping several packages to reflect the config change.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web/tsconfig.tests.json | Drops duplicated compiler options so tests config inherits from tsconfig.base.json. |
| packages/web/tsconfig.json | Removes redundant declaration settings (kept in base) while retaining package-specific emit/output options. |
| packages/types/tsconfig.json | Removes duplicated interop/incremental options and relies on base defaults. |
| packages/react/tsconfig.tests.json | Removes duplicated incremental option while keeping test-specific settings. |
| packages/react/tsconfig.stories.json | Removes duplicated compiler options and keeps storybook-specific includes/types. |
| packages/react/tsconfig.lib.json | Removes duplicated compiler options and retains library build-specific settings. |
| packages/cli/tsconfig.json | Removes duplicated interop/json-module options so CLI config inherits from base. |
| internal/components/tsconfig.json | Removes duplicated options and refactors config structure (but see review comment re: rootDir). |
| apps/www/tsconfig.json | Removes duplicated base options and keeps app-specific path alias configuration. |
| apps/themebuilder/tsconfig.json | Same as apps/www, keeping only app-specific overrides for aliasing/types. |
| .changeset/cold-webs-bathe.md | Adds a changeset for publishing packages impacted by the tsconfig refactor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Tobias Barsnes <tobiasbarsnes@gmail.com>
Co-authored-by: Michael Marszalek <mimarz@gmail.com>
|
Looks like the four test failures came from Vite re-optimizing dependencies mid-test, not the tsconfig changes |
yeah, these tests are flaky sometimes, haven't had the time or willpower to fix them yet 😅 |
mimarz
left a comment
There was a problem hiding this comment.
Tested apps locally. Looks to work fine 👍
Thanks for helping us clean up!
No worries! Im happy to help :) |
Summary
This PR removes duplicate
compilerOptionsfrom package and application tsconfigsthat are already defined in
tsconfig.base.json. Also fixesrootDirininternal/components/tsconfig.jsonwhich was placed outsidecompilerOptions, causing it to be ignored by TypeScript.Checks
pnpm changesetif relevant)