Tech News
← Back to articles

How Twitch tamed a million lines of TypeScript

read original related products more articles

At Twitch, my team’s charter was to define and maintain core engineering standards: performance constraints, architectural patterns, TypeScript usage, tests, and lint rules. These weren’t preferences — they were the mechanisms that allowed a million-line monolithic codebase to scale across 300 developers shipping code in a fast-moving environment.

A note before going further: this isn’t a critique of TypeScript. The TypeScript team actually took time to meet with us and help us use the language more effectively. The challenges I’m describing weren’t about the tools themselves — they were about coordinating standards across a large, fast-moving organization.

We already had the usual tools in place: lint rules, TypeScript types, tests, and CODEOWNERS. Individually, all of these worked. At scale, they interacted in less predictable ways.

The Practical Problem

As more teams touched the same codebase, we started seeing standards bypassed in ways that were usually accidental:

Editor integrations inserting // eslint-disable comments

comments Copied code carrying exceptions forward

Refactors that moved code without revisiting why a rule existed

TypeScript or test escapes added to unblock short-term work

This wasn’t about people ignoring standards. It was about how easy it was for exceptions to accumulate without visibility.

... continue reading