Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/tsconfig-typescript-7-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@mheob/tsconfig': major
---

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.
7 changes: 4 additions & 3 deletions packages/tsconfig/astro.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Astro",
"compilerOptions": {
"allowJs": true,
"allowUnreachableCode": false,
Expand All @@ -9,8 +10,8 @@
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "preserve",
"module": "ESNext",
"moduleResolution": "Bundler",
"module": "esnext",
"moduleResolution": "bundler",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
Expand All @@ -21,7 +22,7 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ESNext",
"target": "es2023",
"verbatimModuleSyntax": true
}
}
8 changes: 4 additions & 4 deletions packages/tsconfig/base.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Base/Base",
"display": "Base",
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"lib": ["ESNext"],
Expand Down
8 changes: 4 additions & 4 deletions packages/tsconfig/commonjs.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Base/CommonJS",
"display": "CommonJS",
"compilerOptions": {
"lib": ["ES2022"],
"lib": ["ES2023"],
"module": "CommonJS",
"target": "ES2022",
"target": "es2023",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"exactOptionalPropertyTypes": true,
Expand Down
10 changes: 5 additions & 5 deletions packages/tsconfig/esm.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Base/ESM",
"display": "ESM",
"compilerOptions": {
"lib": ["ES2022"],
"module": "ES2022",
"target": "ES2022",
"lib": ["ES2023"],
"module": "esnext",
"target": "es2023",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"exactOptionalPropertyTypes": true,
Expand Down
8 changes: 4 additions & 4 deletions packages/tsconfig/nextjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Next.js",
"compilerOptions": {
"target": "ES2017",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"target": "es2023",
"lib": ["DOM", "DOM.Iterable", "ES2023"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "ESNext",
"moduleResolution": "Node",
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
Expand Down
12 changes: 6 additions & 6 deletions packages/tsconfig/react.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "React",
"compilerOptions": {
"target": "ES2017",
"target": "es2023",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"lib": ["DOM", "DOM.Iterable", "ES2023"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
}
},
"include": ["src"]
}