Skip to content

chore(tsconfig): remove tsconfig duplicates#5045

Merged
mimarz merged 9 commits into
digdir:mainfrom
LakBud:chore/remove-tsconfig-duplicates
Jun 30, 2026
Merged

chore(tsconfig): remove tsconfig duplicates#5045
mimarz merged 9 commits into
digdir:mainfrom
LakBud:chore/remove-tsconfig-duplicates

Conversation

@LakBud

@LakBud LakBud commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR removes duplicate compilerOptions from package and application tsconfigs
that are already defined in tsconfig.base.json. Also fixes rootDir in
internal/components/tsconfig.json which was placed outside compilerOptions, causing it to be ignored by TypeScript.

Checks

@changeset-bot

changeset-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ddc1335

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When 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

@LakBud LakBud changed the title Chore(tsconfig): remove tsconfig duplicates chore(tsconfig): remove tsconfig duplicates Jun 27, 2026
@LakBud LakBud marked this pull request as ready for review June 27, 2026 00:16
@LakBud

LakBud commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

The azure failure checks seems unrelated to the code changes since its only changes to the tsconfig files.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 compilerOptions from multiple package/app tsconfig*.json files in favor of tsconfig.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.

Comment thread internal/components/tsconfig.json
Comment thread apps/www/tsconfig.json Outdated
Comment thread apps/themebuilder/tsconfig.json Outdated
Comment thread .changeset/cold-webs-bathe.md Outdated
Comment thread .changeset/cold-webs-bathe.md Outdated
@LakBud

LakBud commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Looks like the four test failures came from Vite re-optimizing dependencies mid-test, not the tsconfig changes

@mimarz

mimarz commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

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 mimarz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested apps locally. Looks to work fine 👍

Thanks for helping us clean up!

@mimarz mimarz merged commit ae95942 into digdir:main Jun 30, 2026
13 of 16 checks passed
@LakBud

LakBud commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Tested apps locally. Looks to work fine 👍

Thanks for helping us clean up!

No worries! Im happy to help :)

@LakBud LakBud deleted the chore/remove-tsconfig-duplicates branch June 30, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants