The creator of Prettier recounts the 10-year journey from concept to widespread adoption, explaining how the tool ended the "tabs vs spaces" debate by automating code formatting. Starting from a winter break project in 2016, the author details technical challenges like handling comments and method chaining, the strategic rollout at Facebook affecting millions of lines of code, and the profound impact of format-on-save functionality. The post covers implementation decisions based on Philip Wadler's pretty printer algorithm, the testing infrastructure using Jest snapshots, and ongoing maintenance challenges including funding through Open Collective to pay maintainers.
Table of contents
Back StoryPotential SolutionsWinter BreakPrettierPrinting DifficultiesInternal RolloutSolving the problemMaintenanceAftermath2 Comments
Sort: