---
title: "How to speed up JavaScript and TypeScript CI"
description: "Speed up JavaScript and TypeScript CI with oxlint, Vite 8 and Rolldown, Vitest sharding, TypeScript 7, and the experimental tsrs Rust port."
url: https://9apes.com/blog/speed-up-javascript-typescript-ci/
---

# How to speed up JavaScript and TypeScript CI

To speed up JavaScript and TypeScript CI in 2026, replace the three slowest tools in a typical pipeline with their native rewrites: ESLint with oxlint, the JavaScript `tsc` with TypeScript 7, and a Rollup or webpack build with Vite 8 and Rolldown. Then shard the test suite with Vitest and keep dependency installation to one frozen-lockfile step. Each of those tools now has a stable release and a documented migration path.

This post is part of a series on [speeding up CI](/blog/speed-up-ci-builds/). The hub covers techniques that apply to every language; this one covers the JavaScript toolchain.

## Lint with oxlint

[Oxlint](https://oxc.rs/docs/guide/usage/linter.html) is a linter written in Rust, part of the Oxc project. It reached 1.0 in June 2025, and its maintainers describe it as 50 to 100 times faster than ESLint. Those are vendor benchmarks; on a large repository, expect lint to go from minutes to seconds.

Type-aware linting, the reason many teams kept typescript-eslint, became [stable in July 2026](https://oxc.rs/blog/2026-07-22-type-aware-linting-stable). It uses `tsgolint`, built on TypeScript 7, and covers 59 of typescript-eslint's 61 type-aware rules:

```bash
pnpm add -D oxlint oxlint-tsgolint@7
pnpm oxlint --type-aware
```

The Oxc team reports type-aware linting at 12 to 18 times faster than ESLint with typescript-eslint, for example 83.2 seconds down to 6.96 seconds on the VS Code repository.

### Migrating without losing rules

You do not have to switch in one step. [`eslint-plugin-oxlint`](https://github.com/oxc-project/eslint-plugin-oxlint) turns off the ESLint rules that oxlint already covers, so you can run both and let ESLint handle only what is left:

```js
// eslint.config.js
import oxlint from 'eslint-plugin-oxlint';

export default [
  // ...your existing config
  ...(await oxlint.buildFromConfigFile('./.oxlintrc.json')),
];
```

```json
{ "scripts": { "lint": "oxlint && eslint" } }
```

Oxlint fails first and fast, and ESLint's remaining work shrinks as you move rules over. For the full switch, `@oxlint/migrate` converts an ESLint flat config to `.oxlintrc.json`. Support for ESLint-compatible JavaScript plugins exists but is still alpha, and Vue, Svelte, and Angular files are not yet covered, so frameworks with custom ESLint plugins may need ESLint for a while longer.

### Formatting

[Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html), the Oxc formatter, is in beta. It passes Prettier's JavaScript and TypeScript conformance tests, and the team reports it at roughly 30 times faster than Prettier. Use `oxfmt --check` in CI. [Biome](https://biomejs.dev/) is a mature alternative that combines formatting and linting in one tool. Either way, formatting should be the fastest job in your pipeline.

## Build with Vite 8 and Rolldown

[Vite 8](https://vite.dev/blog/announcing-vite8), released in March 2026, uses Rolldown as its single bundler for both development and production, replacing the esbuild and Rollup pair. The Vite team claims up to 10 to 30 times faster builds and cites production results such as Linear's build dropping from 46 seconds to 6.

If you are on Vite 7, the release notes recommend trying the `rolldown-vite` package first, then upgrading. Vite 8 requires Node 20.19+ or 22.12+. For projects still on webpack, the build step is often the largest single item in the critical path, and moving to Vite is usually the biggest change available.

## Test with Vitest, sharded

[Vitest 5](https://vitest.dev/blog/vitest-5) shares the Vite pipeline, so transforms you already configured are reused. Two settings matter most in CI.

**Sharding with merged reports.** Split test files across a matrix, write blob reports, and merge them in a final job:

```yaml
jobs:
  test:
    runs-on: 9apes
    strategy:
      matrix:
        shard: [1, 2, 3]
    steps:
      - uses: actions/checkout@v7
      # ...install dependencies
      - run: pnpm vitest run --reporter=blob --shard=${{ matrix.shard }}/3
      - uses: actions/upload-artifact@v7
        with:
          name: blob-${{ matrix.shard }}
          path: .vitest
          include-hidden-files: true

  report:
    needs: test
    runs-on: 9apes
    steps:
      - uses: actions/checkout@v7
      # ...install dependencies
      - uses: actions/download-artifact@v8
        with:
          path: .vitest
          merge-multiple: true
      - run: pnpm vitest run --merge-reports
```

Vitest shards by file, so one very large test file stays on one shard. Each shard also repeats checkout and installation. Shard only when the test run is much longer than that setup.

**Pools and isolation.** The default pool is `forks`. The [performance guide](https://vitest.dev/guide/improving-performance) describes `threads`, `vmThreads`, and `--no-isolate` as faster options when your tests do not depend on per-file isolation. Vitest 5 reports the largest gains in the vm pools on dependency-heavy suites. Measure on your suite; isolation bugs are expensive to debug.

## Type check with TypeScript 7

[TypeScript 7.0](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/), released on July 8, 2026, is the native port of the compiler to Go. The package is still `typescript` and the binary is still `tsc`. Microsoft reports full-build speedups of 8 to 12 times, for example VS Code dropping from 125.7 seconds to 10.6:

```bash
pnpm add -D typescript@7
pnpm tsc --noEmit
```

It also checks in parallel; the `--checkers` flag controls how many type-check workers run (four by default). That changes the hardware question: the JavaScript `tsc` was mostly single-threaded, while TypeScript 7 can use more of a runner's cores.

### What still needs TypeScript 6

TypeScript 7.0 ships without a programmatic API. Tools that call the compiler as a library, including typescript-eslint and checkers for Vue, Svelte, Astro, and MDX files, still need [TypeScript 6.0](https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/), the bridge release from March 2026. Microsoft also publishes `@typescript/typescript6`, which installs a `tsc6` binary, so a repository can keep a 6.x compiler available while `tsc` moves to 7. Check how each of your tools locates TypeScript before you switch the main package.

TypeScript 6 also deprecates options that 7.0 removes. Upgrade to 6 first, fix the deprecation warnings, and then move the plain `.ts` check to 7. The [TypeScript 7.1 beta](https://devblogs.microsoft.com/typescript/announcing-typescript-7-1-beta/) from October 2026 adds a new API and prototypes support for framework files, so the split should be temporary.

## What comes after TypeScript 7: tsrs

On October 20, 2026, Cloudflare and VoidZero [announced tsrs](https://blog.cloudflare.com/typescript-rust-port/), an experimental port of the TypeScript compiler from Go to Rust. It is incubated in the [Oxc project](https://github.com/oxc-project/tsrs) and ported function by function from the Go code in collaboration with the TypeScript team, rather than as a fork with its own semantics.

Its early benchmarks claim up to 8 times faster type checking than TypeScript 7.0 with about 70% less memory at the same number of workers. Treat those as early numbers from the authors. It has no editor language server yet, and framework file support is still missing.

To try it alongside your existing check:

```bash
npm install -D tsrs
npx tsrs
```

Do not make it your only type check yet. Run it as a non-blocking job, compare its diagnostics with `tsc`, and watch how quickly its releases track TypeScript's. If both projects keep their promises, type checking may stop being the slow part of most TypeScript pipelines.

## Install dependencies once, from the lockfile

pnpm switches to frozen-lockfile mode automatically when it detects CI, so a mismatched lockfile fails instead of resolving. Cache the pnpm store, not `node_modules`. The [`pnpm/setup`](https://github.com/pnpm/setup) action installs pnpm and Node, restores the store, and runs the install:

```yaml
- uses: actions/checkout@v7
- uses: pnpm/setup@v3
  with:
    runtime: node@24
    cache: true
```

[pnpm's CI guide](https://pnpm.io/continuous-integration) notes that store caching is not guaranteed to help. On a runner with fast disk and network, a fresh install can beat downloading and extracting a large cache archive. Time both.

Node can now also run `.ts` files directly. [Type stripping](https://nodejs.org/api/typescript.html) is on by default since Node 22.18 and marked stable in Node 24.12. Scripts and tooling that ran through `ts-node` or a build step can often run as plain `node script.ts`, removing a compile step from CI. It strips types without checking them, and it rejects syntax that needs code generation, such as `enum` and parameter properties.

## A fast JavaScript pipeline, assembled

Put together, a typical pull request pipeline runs these jobs in parallel:

| Job | Tool | Notes |
| --- | --- | --- |
| Format | `oxfmt --check` or Biome | Seconds; fails first |
| Lint | `oxlint --type-aware`, then ESLint for leftovers | Remove ESLint as rules move |
| Type check | `tsc` from TypeScript 7 | Keep TypeScript 6 for framework files |
| Test | Vitest, sharded if large | Merge blob reports in one job |
| Build | Vite 8 | Rolldown is the default bundler |

Each job installs from the same lockfile. The slowest of them is your critical path; that is the one worth sharding or moving to a larger runner.

## How 9apes speeds up JavaScript CI

Native tools change what limits a JavaScript pipeline. Once lint and type checking finish in seconds, setup, installation, and the test run are what remain, and they depend on CPU speed and disk.

9apes runs each GitHub Actions job in a fresh microVM on hardware chosen for high single-core performance with NVMe storage. That helps single-threaded work such as individual test workers and bundler phases, and dependency extraction. TypeScript 7's parallel checker and Vitest's worker pools can use more cores, so a 4 or 8 vCPU runner is worth testing for those jobs while lint stays on a small one:

```diff
- runs-on: ubuntu-latest
+ runs-on: 9apes-8vcpu-ubuntu-2404
```

We have not published a JavaScript-specific benchmark. The [9apes benchmarks](/benchmarks/) cover compiled C++, Rust, and Go builds. To measure your own pipeline, follow the [quick start](/docs/quick-start/), move one job, and compare complete job time against [current pricing](/pricing/).

## Is TypeScript 7 ready for CI?

Yes, for type checking plain TypeScript. Keep TypeScript 6 installed for tools that need the compiler API, such as typescript-eslint and framework checkers like `astro check` and `vue-tsc`.

## Can oxlint replace ESLint completely?

For many projects, yes, including type-aware rules. Projects that depend on custom ESLint plugins or lint Vue, Svelte, or Angular files should run both with `eslint-plugin-oxlint` until those gaps close.

## What is tsrs?

tsrs is an experimental Rust port of the TypeScript compiler, announced by Cloudflare and VoidZero in October 2026. Early benchmarks claim it is faster and lighter than TypeScript 7.0. It is not production-ready yet.

## Should I cache node_modules in GitHub Actions?

Usually not. Cache the pnpm store and run `pnpm install`, and measure whether even the store cache beats a fresh install on your runner.
