Javascript code formatting
summary
Covers building Prettier: an actual JavaScript code formatter that rewrites whole files using an AST and the group/indent/if-break primitives, plus pragmatic fixes like adding parentheses for ambiguous expressions. Shows adoption data β 3x more files without JSX parentheses at Facebook β and tooling: snapshot regression tests, a conversion that runs across a large codebase in minutes, and options kept minimal. Demonstrates both technical algorithmic choices and the social rollout that makes it usable.
AI-written summary Β· about
chapters (12)
- 0:00Introduction
- 1:27JavaScript formatting with Prettier
- 3:56Prettier vs ESLint
- 5:21Building a pretty printer
- 8:53Core formatting algorithm
- 13:12Code to formatted output
- 17:50Real-world formatting nuances
- 21:24Controversial Prettier choices
- 24:10Adopting Prettier
- 33:59Invisible Prettier fixes
- 36:50Success stories
- 37:34Q&A
related talks
18mPrettier β How to Ensure Well-Formatted Code
08mA Prettier Printer
20mThey see me refactorin'. They hatin'
43mJavaScript β€ binary data
44mJavaScript AST programming: Introduction and beyond
40mRefactoring large JavaScript codebases
20mJavaScript Transformation
28mMaster the art of the AST and take control of your JS
