Skip to content

Type-check with TypeScript 7 (TS 6 kept for ESLint and Storybook) - #223

Closed
deebov wants to merge 1 commit into
mainfrom
chore/typescript-7
Closed

deebov wants to merge 1 commit into
mainfrom
chore/typescript-7

Conversation

@deebov

@deebov deebov commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Moves type-checking to TypeScript 7 (the native Go compiler) while keeping the tools that need the compiler API working.

TS 7 ships no JS compiler API (the typescript@7 package exports only lib/version.cjs plus unstable/*), and typescript-eslint, including the 8.71 canary, still declares typescript >=4.8.4 <6.1.0. A plain bump breaks ESLint and Storybook's react-docgen-typescript. This uses the side-by-side setup the TypeScript team publishes for that:

"@typescript/native": "npm:typescript@^7.0.2",          // provides the `tsc` bin → TS 7
"typescript": "npm:@typescript/typescript6@^6.0.2",     // compiler API for typescript-eslint, react-docgen-typescript (bin is `tsc6`, no clash)

Checked:

  • bun run test (type-check + ESLint + Prettier): passes, same as main. tsc --noEmit now runs on 7.0.2.
  • require("typescript") still resolves the 6.0.3 compiler API, and react-docgen-typescript parses Button (108 props).
  • bun install --frozen-lockfile passes. The lockfile was edited by hand so only the TypeScript entries change (a plain reinstall re-resolved hundreds of unrelated packages).

When typescript-eslint supports TS 7, drop the alias and use "typescript": "^7".

Dev tooling only: nothing users install changes.

🤖 Generated with Claude Code

TS 7 ships no JS compiler API, and typescript-eslint still requires
typescript <6.1. Side-by-side setup published by the TypeScript team:

- "typescript" -> @typescript/typescript6 (bin tsc6): typescript-eslint and
  Storybook's react-docgen-typescript keep the compiler API.
- "@typescript/native" -> typescript@7, which provides the tsc bin, so
  type-check runs on TS 7.

Lockfile edited by hand: only the TypeScript entries changed.
@deebov

deebov commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #224 (TS 7 + oxlint/oxfmt on v9, no TS 6 alias).

@deebov deebov closed this Oct 9, 2026
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.

1 participant