Skip to content

Upgrade to TypeScript 7 #4982

Description

@VariableVince

GThe project went from TS5 to 6 #3806 and is mostly ready for TypeScript 7.

One easy change to make the move possible:

  • in .vscode/launch.json replace ts-node with tsx

On top of that, three blockers are known because they use the current API for which there is no replacement yet:

  • typescript-eslint
  • prettier-plugin-organize-imports in .prettierrc
  • tests/TranslationSystem.test.ts

Options with possible timelines dates below.

Option 1 Nov '26-Jan '27: wait for TS 7.1 and dep releases and rewrite test

TS7 will get a new, different, API in 7.1 which is expected to release in November 2026: microsoft/TypeScript#63703 (also see https://github.com/microsoft/typescript-go/milestone/6 and https://github.com/microsoft/TypeScript/milestone/224 for current state of work).

Once 7.1 with the API is there, we'd still need:

Then we could fully switch from TypeScript 6 to 7.

Option 2 Aug '26: hybrid TS6 and TS7 first, then Option 1

Use the hybrid option so all three keep working with the TS 6 API while the rest enjoys the speedup of TypeScript 7.

https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0

So switch to TS 7 right away and do Option 1 for the blockers in Nov '26-Jan '27.

Option 3 Aug-Dec '26: replace blockers as soon as possible

When all are done, we could move to TS 7.

  • replace typescript-eslint with oxlint-tsgolint. We already started the migration to oxlint including oxlint-tsgolint feat(devops): add Oxlint alongside ESLint for incremental migration #3866. Once it covers enough and we're ready, we could let go of typescript-eslint completely. Oxlint-tsgolint is not dependent on the TypeScript API so we don't need to wait for TS 7.1.
  • replace prettier-plugin-organize-imports with oxfmt with sortImports: true. We already have a draft PR for this, although it has sortImports: false as it wants to migrate slowly overtime. feat(devops): add Oxfmt alongside Prettier for incremental migration #3871
  • replace the typescript import in tests/TranslationSystem.test.ts. It doesn't need the TypeScript compiler; any standalone TS-aware parser bridges the gap. Use osx-parser (preferred, fits in oxlint and ofmt toolchain family) or @babel/parser (already shipped with vite in our repo).

Option 4 Aug '26-Jan '27: mix

A mix of Options 1-3. Including the change to .vscode/launch.json mentioned at the start of course.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DevopsInfrastructure, CI/CD, dependencies, and maintenance.approvedApproved for a PR, if you assigned to the issue.

    Type

    No type

    Projects

    Status
    Triage

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions