Skip to content

fix(tsconfig): support TypeScript 7 options#394

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
update-tsconfig
Jul 18, 2026
Merged

fix(tsconfig): support TypeScript 7 options#394
kodiakhq[bot] merged 1 commit into
mainfrom
update-tsconfig

Conversation

@mheob

@mheob mheob commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

Update every @mheob/tsconfig preset so it stays valid under TypeScript 7, whose native compiler
hard-removes several options the presets relied on.

Changes

  • Replace the removed classic node/Node module resolution with bundler in commonjs.json,
    esm.json, nextjs.json, and react.json (base.json and astro.json already used bundler).
  • Drop esModuleInterop: false from react.json — TS7 no longer allows disabling it.
  • Align target/lib levels to ES2023 and normalize compiler-option value casing (e.g. esnext,
    bundler) for consistency across presets.
  • Fix display names (base.json, astro.json) and add a missing include to react.json.
  • Add a major changeset for @mheob/tsconfig since consumers relying on the old resolution
    behavior may see different module-resolution results.

Motivation

With typescript@7 installed, tsc failed outright on commonjs.json, esm.json, nextjs.json,
and react.json with TS5108: Option 'moduleResolution=node10' has been removed (and, for
react.json, the same error for esModuleInterop=false). Every preset now type-checks cleanly
against TypeScript 7.

Summary by CodeRabbit

  • New Features

    • Updated TypeScript configuration presets for TypeScript 7 compatibility.
    • Modernized module resolution across Astro, CommonJS, ESM, Next.js, React, and base presets.
    • Updated supported JavaScript targets and library definitions to newer standards.
    • Simplified and standardized preset display names.
  • Breaking Changes

    • Released as a major version due to TypeScript 7 configuration changes.
    • React and Node-style configurations may require migration to the updated settings.

TypeScript 7 removes the classic `node`/`Node` module resolution and
the `esModuleInterop: false` override, which broke every preset
except `base` and `astro`. Replace the legacy Node resolution with
`bundler` in `commonjs`, `esm`, `nextjs`, and `react`, drop the
disallowed `esModuleInterop: false` from `react`, and align enum
casing, target/lib levels, and display names across all presets for
consistency.
@changeset-bot

changeset-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c8f070c

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

This PR includes changesets to release 1 package
Name Type
@mheob/tsconfig Major

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

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 505f15d0-7d56-403a-b349-22b913a30674

📥 Commits

Reviewing files that changed from the base of the PR and between 1d31bee and c8f070c.

📒 Files selected for processing (7)
  • .changeset/tsconfig-typescript-7-support.md
  • packages/tsconfig/astro.json
  • packages/tsconfig/base.json
  • packages/tsconfig/commonjs.json
  • packages/tsconfig/esm.json
  • packages/tsconfig/nextjs.json
  • packages/tsconfig/react.json

Walkthrough

The TypeScript configuration presets are aligned with TypeScript 7 requirements, including bundler module resolution, updated targets and libraries, normalized casing, revised display names, and removal of React’s esModuleInterop override. A major-release changeset documents the updates.

Changes

TypeScript configuration updates

Layer / File(s) Summary
Modernize preset compiler settings
packages/tsconfig/*.json, .changeset/tsconfig-typescript-7-support.md
Presets update module resolution, targets, libraries, casing, and display names; the React preset removes esModuleInterop, and the changeset declares a major version bump with TypeScript 7 compatibility notes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: tsconfig

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: updating tsconfig presets for TypeScript 7 compatibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-tsconfig

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mheob mheob added enhancement 📈 New feature or request tsconfig 🔧 Belongs to tsconfig major ⚠️ labels Jul 18, 2026
@kodiakhq
kodiakhq Bot merged commit 4e802c7 into main Jul 18, 2026
9 checks passed
@kodiakhq
kodiakhq Bot deleted the update-tsconfig branch July 18, 2026 13:14
kodiakhq Bot pushed a commit that referenced this pull request Jul 18, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.


# Releases
## @mheob/tsconfig@3.0.0

### Major Changes

- [#394](#394) ([@mheob](https://github.com/mheob)): Update all tsconfig presets to work with TypeScript 7. TS7 hard-removes the classic `node`/`Node` module resolution and the
  `esModuleInterop: false` override, which broke every preset except `base` and `astro`. Replace the legacy Node resolution with
  `bundler` in `commonjs`, `esm`, `nextjs`, and `react`, drop the disallowed `esModuleInterop: false` from `react`, and align enum
  casing, target/lib levels, and display names across all presets for consistency.
mheob added a commit that referenced this pull request Jul 18, 2026
## Summary

Remove the hardcoded `include: ["src"]` that ended up in the `react`
preset (`@mheob/tsconfig`)
during the TypeScript 7 update.

## Changes

- Drop `include: ["src"]` from `packages/tsconfig/react.json`.
- Add a `patch` changeset for `@mheob/tsconfig`.

## Motivation

Every other preset (`base`, `commonjs`, `esm`, `astro`) leaves `include`
unset so consumers control
which files get compiled. The `react` preset picked up a stray
`src`-only restriction as part of the
prior TypeScript 7 fix (#394), which would silently exclude any consumer
project that doesn't keep
its sources under `src`. This restores the preset to the same extensible
behavior as the others.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 📈 New feature or request major ⚠️ tsconfig 🔧 Belongs to tsconfig

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant