NewsCrawler.org

Switching to tsrs sped up oxlint type-aware linting and typecheck in CI

tsrs を導入したら oxlint の type-aware linting と typecheck が爆速になった話
tsrs を導入したら oxlint の type-aware linting と typecheck が爆速になった話
CI のステップの所要時間(中央値)
Image: zenn.dev

The author (ぷーじ, @yug1224) describes replacing the tools that handled type-aware linting and typechecking in the CI of a frontend and a backend with tsrs[1], which can do both jobs. tsrs is a port of the TypeScript 7 compiler (tsc) to Rust, and the version used, 0.25.0-ts7.1.0-beta, conforms to TypeScript 7.1 beta. On 17 November 2026 the Oxc blog announced that oxlint's type-aware linting[2] could use tsrs, and on 18 November the author installed it in both projects.

tsrs replaced tsgolint as the source of type information for oxlint's linting and replaced tsc --noEmit as the typecheck command. In CI, the median backend typecheck time fell from 229 seconds (708 runs) to 11 seconds (30 runs), and the frontend's fell from 112 seconds to 14 seconds. Locally, a cold backend typecheck took 5.8 seconds instead of 103 seconds. The results matched the earlier tools: the frontend's 97 lint findings were identical, the backend's 1496 warnings stayed the same, and the typecheck error output was identical, although tsrs exits with code 2 and tsc with code 1.

The switch happened in two steps: first tsrs ran in a non-required job beside tsc on the same runner, then the typecheck script was changed and TypeScript 7.0.2 was removed from the typecheck dependencies. Problems included oxlint continuing to use tsgolint while it stayed installed, and a false TS2674[3] error from tsrs on an anonymous class that calls new this() on a protected constructor, which was avoided by naming the class. The tsbuildinfo[4] cache was removed because a full check takes 10 to 14 seconds in CI, and a cache hit with tsc checked nothing.

Read the original zenn.dev

Sources

  • Zenn JA

    tsrs を導入したら oxlint の type-aware linting と typecheck が爆速になった話

    50 likes11 bookmarks0 comments

Published: First seen: Читать по-русски

Open as a page