Software Engineering Daily
Episode Summary: "Prettier and Opinionated Code Formatting with James Long"
Date: March 19, 2026
Host: Josh Goldberg
Guest: James Long (creator of Prettier, former Mozilla & Stripe engineer)
Episode Overview
This episode explores the origins, adoption, and ongoing evolution of Prettier, the opinionated code formatter that transformed JavaScript (and beyond) development. James Long discusses the emotional dynamics of formatting debates, the technical intricacies of writing a formatter, open source project maintenance, and the shifting landscape of JavaScript tooling. Along the way, he shares thoughtful perspectives on what makes technical tools succeed, why formatting debates matter, and how the software community’s values and needs continue to evolve.
Key Discussion Points & Insights
1. James Long’s Background & Entry into Dev Tooling
- Early Interest:
- Started programming as a “90s kid” on an Apple II, experimenting with visual programming and music commands.
- Early creative itch: “It just always kind of been that thing that has satisfied a creative itch for me.” (James Long, 02:56)
- Web Development Shift:
- Moved into web dev over game dev out of career practicality and creative satisfaction ("The web was interesting too because it was also a visual thing...satisfied that creative itch a little bit." 04:05).
2. What is Prettier and Why Was It Created?
- Prettier’s Purpose:
- An opinionated JavaScript formatter, primarily taking a single configuration (print width).
- Why needed: To eliminate time-wasting formatting debates in code reviews, making code style uniform and automated.
- “I hated the PR review… such a waste of time to be having these PR reviews go back and forth about formatting nits. And it was like a weirdly emotional thing...” (James Long, 06:38)
- Surprising Side Effects:
- Instant formatting in editors increased productivity and lowered cognitive load ("You can write code like in a very stupid way, you can write it all on one line... and it just formats it in the production-ready format.” 07:22).
3. Why Not Just Use ESLint or Linters?
- Configurability as a Downside:
- ESLint config at Mozilla was ~100 rules just for formatting, still leading to debates.
- Technical Limits of Linters:
- Linters can’t express contextual, dynamic rules ("You just can't express that with ESLINT's rule based system.” 08:46).
- Prettier offers holistic, contextual formatting for complex JS.
4. Pushback & Community Adoption
- Early Resistance:
- Developers attached meaning to visual code alignment (e.g., aligning equals signs).
- “Once you kind of start using it, you see that you're still able to understand the code just as much...I think you might need to care about like 1%, 0.1% of your code.” (James Long, 10:49)
- Social Proof Wins:
- Pushback faded as benefits became evident and social adoption increased.
5. The Timing & Design Philosophy Behind Prettier’s Success
- Why Not Sooner?
- Previous attempts (and ESLint) either too rigid (like gofmt) or too limited for JS’s nesting and dynamism.
- “For this project to succeed, it needed to pass...a bar that I don't think other formatters had quite hit yet.” (James Long, 13:54)
- Viral Launch:
- Right tool at the right time, benefited from organic virality and fortunate timing.
6. Open Source Sustainability & Maintenance
- Financial Realities:
- No company behind Prettier; open source model with modest donations ($243,000 over 9 years: 21:47).
- “As far as I know, like nobody's full time working on Prettier...They probably deserve more money but it's not the kind of thing...there's not a business about to falter because there's not money coming.” (James Long, 19:36)
- Compensating Maintainers:
- Some money to contributors, but no one’s full time; relies on goodwill.
7. The Lifecycle of Open Source Projects: Exploration vs. Maintenance
- Different Joys:
- Creation phase: ambiguous, exciting, vision-driven.
- Maintenance phase: incremental improvements, sometimes less rewarding but essential.
- Project Evolution:
- Innovations (like plugin systems or Rust rewrites such as oxformat) bring new creative energy at times (23:22).
8. Technical Intricacies of Building a Formatter
- Parsing and ASTs:
- Prettier parses input to an Abstract Syntax Tree (AST), then converts this to an intermediate representation for formatting.
- “That’s all that a parser is... It takes [code] and creates that AST, which is a tree of semantic information.” (James Long, 40:33)
- Hardest Problems:
- Performance (caching, large code bases with many files).
- Comment Handling: “Comments are not semantically meaningful… comments are not an AST node either. So we had to extend ASTs...” (James Long, 45:33)
- Error Tracing: Mapping errors back to input line/column is non-trivial.
9. The Ongoing Evolution of JS Tooling & Prettier’s Place in the Ecosystem
- Rust Rewrites & Performance:
- Tools like oxformat and Biome, rewriting in Rust, aim for faster, unified workflows by parsing once and sharing ASTs across formatters and linters.
- “A lot of times a JavaScript to Rust rewrite isn't faster because it's in Rust... It's an additional reason to also optimize all of this toolchain stuff too.” (James Long, 39:30)
- Composability vs. Integration:
- JavaScript’s ecosystem has been criticized for fragmentation, but composable tools bring flexibility for complex needs (31:44).
- Out-of-the-box tools like Bun and Vite have greatly improved user experience and configuration pain.
10. The Future of JS/Web Tooling
- Fewer Pain Points:
- “I have to be honest that I'm really happy with tooling right now.” (James Long, 33:55)
- Expresses skepticism about React Server Components, excitement about Remix and SolidJS.
- Focus for the Future:
- More innovation in server-side rendering and seamless client-server interactions; less need for more bundler/formatter innovation.
11. Notable Quotes & Memorable Moments
- On Emotional Code Style Debates:
“It was like this thing that tended to fall into some of our OCD or perfectionism traits that maybe a lot of people just couldn't help but care about the formatting.” (James Long, 06:58)
- On Prettier’s Social Adoption:
“Eventually they saw...as more and more people started using it, then they would try it out...I think you might need to care about like 1%, 0.1% of your code.” (James Long, 10:49)
- On the Open Source Funding Gap:
“It’s not enough. My wife actually...was like, okay, so...how is this going to make money? Like, why aren’t you making money right now? Because you’re putting all this time into it. I was like, you don’t understand. It’s open source. It’s awesome.” (James Long, 22:04)
- On Formatting Comments:
“Comments are not an AST node either. When you parse something into an AST, it’s not part of the AST...It's a whole bucket of edge cases. It's hard.” (James Long, 45:33)
- On Music Theory & Creativity:
“Music is this beautiful movement about a little bit of dissonance and moving up and through the keys.” (James Long, 48:30)
12. Timestamps for Major Segments
- James’s Early Days & Creative Spark: 02:18 – 04:50
- What is Prettier / Linters vs. Formatters: 05:27 – 09:39
- Formatting Pushback & Social Proof: 09:39 – 11:40
- Prettier’s Timing & Viral Uptake: 11:40 – 15:06
- Initial Community Reaction: 16:54 – 19:10
- Open Source Maintenance & Funding: 19:10 – 22:43
- Project Creation vs. Maintenance: 23:22 – 25:52
- Prettier’s Place Today and Rust Rewrites: 25:52 – 31:09
- JavaScript Tooling Ecosystem: 31:09 – 33:55
- Future Needs and Personal Tool Preferences: 33:55 – 36:20
- Technical Deep Dive (Parsing, AST, Comments): 36:30 – 46:51
- Music Theory Digression: 47:03 – 49:20
Conclusion & Where to Find James
This episode delivers a comprehensive, personal, and technically rich exploration of Prettier’s journey, the nature of code formatting debates, the reality of open source labor, and ongoing innovation in developer tooling.
Find James Long online:
- Website: jlongster.com
- Twitter/X: @jlongster
Summary structured and curated to capture all significant topics, memorable moments, and technical insights in the engaging and candid style of the episode’s conversation.
