openfrontio / openfrontio/OpenFrontIO

Upgrade to TypeScript 7

Open
#4,982 2 comments 0 reactions 0 assignees View on GitHub
approved Devops
Dominant language
TypeScript
Stars
2.7k
Forks
1.4k
Avg merge
17h 43m
Merged PRs (30d)
310

Description

The project went from TS5 to 6 https://github.com/openfrontio/OpenFrontIO/pull/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: https://github.com/microsoft/TypeScript/issues/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:
- a typescript-eslint release that works with it: https://github.com/typescript-eslint/typescript-eslint/issues/10940
- a prettier-plugin-organize-imports release that supports it: https://github.com/simonhaenisch/prettier-plugin-organize-imports/issues/161
- our rewrite of `tests/TranslationSystem.test.ts` to the new API

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 https://github.com/openfrontio/OpenFrontIO/pull/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. https://github.com/openfrontio/OpenFrontIO/pull/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.

Contributor guide

Open the contributing guide

Research direction

Start with .vscode/launch.json and review the listed blockers: typescript-eslint, .prettierrc, and tests/TranslationSystem.test.ts. Read the referenced TypeScript 7 and migration issues, then determine which option is selected; done means the chosen migration path works and the project can move from TypeScript 6 to 7 without those blockers.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.