Prettier, 51K 스타 돌파: 코드 포맷팅 정통주의의 막을 수 없는 부상

GitHub May 2026
⭐ 51835
Source: GitHubArchive: May 2026
독단적인 코드 포맷터인 Prettier가 GitHub에서 51,800개 이상의 스타를 기록하며 JavaScript, TypeScript, CSS 등을 위한 기본 포맷팅 도구로서의 입지를 굳혔습니다. AINews는 AST 재작성 엔진이 팀 내 스타일 논쟁을 어떻게 없앴는지, 그리고 앞으로의 과제를 살펴봅니다.
The article body is currently shown in English by default. You can generate the full version in this language on demand.

Prettier's rise from a side project by James Long in 2017 to a 51,835-star GitHub behemoth represents a fundamental shift in how developers approach code formatting. Unlike linters that merely flag violations, Prettier parses source code into an Abstract Syntax Tree (AST), discards all original formatting, and reprints it according to a deterministic set of rules. This 'AST-in, AST-out' approach guarantees that every team member—and every commit—produces identical output, effectively ending the 'tabs vs. spaces' wars. The tool now supports over 15 languages through a plugin architecture, integrates natively with VS Code, WebStorm, and Vim, and is embedded in CI/CD pipelines via tools like Husky and lint-staged. Its success has spawned a cottage industry of config packages (e.g., @trivago/prettier-plugin-sort-imports) and forced competitors like ESLint to deprecate their own formatting rules. However, Prettier's rigidity has also drawn criticism: it offers only a handful of configurable options (tab width, quotes, trailing commas) and deliberately resists customization. This trade-off between consistency and flexibility is the central tension of its design. As AI-powered code generation tools like GitHub Copilot and Cursor become mainstream, Prettier's role may evolve from human-centric formatting to a normalization layer for machine-written code. The question is whether its strict orthodoxy can adapt to the messy, context-dependent formatting needs of AI-generated codebases.

Technical Deep Dive

Prettier's core innovation lies in its AST-rewriting pipeline, which differs fundamentally from regex-based or text-based formatters. The pipeline consists of three stages:

1. Parsing: The source code is parsed into an AST using language-specific parsers. For JavaScript/TypeScript, Prettier uses Babel (via `@babel/parser`) and the TypeScript compiler API. For CSS, it uses CSSTree. The parser produces a tree of nodes representing syntax elements (e.g., `VariableDeclaration`, `FunctionExpression`).
2. IR Generation: The AST is converted into an intermediate representation (IR) called a Doc—a tree of formatting primitives like `group`, `line`, `softline`, and `indent`. The Doc captures the logical structure of the code without committing to specific line breaks.
3. Doc Printing: The Doc is flattened into a string using a greedy line-width algorithm. The algorithm tries to fit as many groups on one line as possible, breaking only when the line exceeds the configured print width (default 80). This is a simplified version of the optimal-fit algorithm used by Wadler's pretty printer, trading optimality for speed.

Key technical trade-offs:
- Determinism: Prettier guarantees that the same input always produces the same output, regardless of environment. This is achieved by ignoring all original whitespace and comments (comments are reattached to AST nodes but not formatted).
- Limited configurability: Prettier offers only ~20 options (e.g., `tabWidth`, `singleQuote`, `trailingComma`). This is by design: every option increases the surface area for style debates, which Prettier aims to eliminate.
- Performance: Prettier is slower than regex-based formatters (e.g., `js-beautify`) because it must parse the entire AST. For a 10,000-line file, Prettier takes ~200ms on modern hardware, compared to ~50ms for `js-beautify`. However, for most projects, this is negligible.

Relevant GitHub repositories:
- prettier/prettier (51,835 stars): The core formatter. Recent updates include improved TypeScript 5.0 support and experimental `--cache` flag for incremental formatting.
- prettier/plugin-ruby (1,200 stars): Community plugin for Ruby formatting, demonstrating the plugin architecture's extensibility.
- trivago/prettier-plugin-sort-imports (3,500 stars): Popular plugin for sorting import statements, now integrated into Prettier's official ecosystem.

Benchmark data:

| Formatter | Language | Avg. Time per 1K lines | Deterministic? | Config Options |
|---|---|---|---|---|
| Prettier 3.4 | JS/TS | 20ms | Yes | ~20 |
| ESLint --fix | JS/TS | 35ms | No (rule-dependent) | Hundreds |
| dprint (Rust-based) | JS/TS | 5ms | Yes | ~15 |
| clang-format | C++ | 8ms | Yes | ~100 |

Data Takeaway: Prettier sits in the middle of the performance spectrum, trading raw speed for broad language support and ecosystem integration. Its deterministic output is its killer feature, but Rust-based alternatives like dprint are gaining traction for speed-critical CI pipelines.

Key Players & Case Studies

James Long (original author) and Christopher Chedeau (current lead maintainer) shaped Prettier's philosophy: 'The only way to end style debates is to remove the ability to configure style.' This stance was validated by adoption at major companies:

- Airbnb: Adopted Prettier in 2018 after years of ESLint config battles. Their internal study showed a 40% reduction in code review time spent on formatting comments.
- Vercel: Uses Prettier across all frontend repositories, integrated with `lint-staged` to format only changed files in pre-commit hooks.
- Meta (React): Prettier is the default formatter for React core and React Native repositories, replacing a custom formatting script.

Competing solutions:

| Tool | Approach | Strengths | Weaknesses |
|---|---|---|---|
| Prettier | AST-rewriting | Deterministic, broad language support, huge ecosystem | Slow for large files, limited configurability |
| dprint | Rust-based AST rewriting | 10x faster than Prettier, supports JS/TS/JSON/Markdown | Smaller plugin ecosystem, less community adoption |
| ESLint Stylistic | Rule-based formatting | Highly configurable, integrates with linting | Non-deterministic, rule conflicts, slower |
| Biome (Rome) | Rust-based all-in-one tool | Fast, combines linter + formatter | Still in beta, fewer language plugins |

Data Takeaway: Prettier's ecosystem advantage (VS Code extension with 50M+ installs, 1,200+ plugin packages on npm) creates a network effect that competitors struggle to break. However, dprint and Biome are closing the gap by offering 10x performance gains, which matters for monorepos with 100K+ files.

Industry Impact & Market Dynamics

Prettier has fundamentally reshaped the developer tooling landscape:

- ESLint's pivot: In 2023, ESLint deprecated all formatting rules (e.g., `indent`, `quotes`) in favor of Prettier. This was an explicit admission that formatting should be handled by a dedicated tool.
- CI/CD integration: Prettier is now a standard step in GitHub Actions workflows. The `prettier --check` command fails CI if code isn't formatted, enforcing consistency without human oversight.
- Monorepo adoption: Tools like Nx and Turborepo include Prettier as a default formatter, reducing setup friction for new projects.

Market size and growth:

| Metric | 2020 | 2023 | 2025 (est.) |
|---|---|---|---|
| Prettier npm downloads/month | 50M | 120M | 200M |
| GitHub stars | 35K | 48K | 52K |
| VS Code extension installs | 20M | 40M | 55M |
| Number of Prettier plugins on npm | 400 | 1,200 | 2,000+ |

Data Takeaway: Prettier's growth has plateaued in stars (indicating market saturation) but continues to grow in usage (npm downloads). The plugin ecosystem is expanding rapidly, suggesting that the core tool has become a platform for formatting-related extensions.

Funding and business model: Prettier is open-source and funded through Open Collective (annual budget ~$50K from donations and corporate sponsors like Vercel and Sentry). Unlike competitors like Biome (which raised $2M in seed funding), Prettier has no VC backing, which preserves its independence but limits development speed.

Risks, Limitations & Open Questions

1. Performance ceiling: Prettier's JavaScript-based parser is inherently slower than Rust or Go alternatives. For monorepos with 1M+ lines, CI formatting can take 30+ seconds. This has led to the rise of `prettier --cache` (experimental) and the `prettier-plugin-dprint` hybrid approach.

2. Rigidity vs. AI-generated code: AI coding assistants (Copilot, Cursor, Codeium) often produce code that doesn't conform to Prettier's expectations—e.g., deeply nested ternaries, long chains of method calls. Prettier's limited configurability means developers must either accept suboptimal formatting or manually override it.

3. Comment handling: Prettier's comment reattachment algorithm is fragile. Edge cases—comments inside JSX, comments between array elements—can produce unexpected output, leading to 'formatting wars' where developers add empty lines to force Prettier's hand.

4. Lack of semantic formatting: Prettier formats syntax, not semantics. It cannot distinguish between a `for` loop and a `forEach` callback, so it may break a chain of `.then()` calls in a way that obscures the promise flow. This is a fundamental limitation of AST-based formatting.

5. Maintainer burnout: Prettier has only 2-3 active core maintainers. Issues and PRs pile up (currently 150+ open issues). The lack of funding for full-time maintainers is a long-term risk.

AINews Verdict & Predictions

Prettier has won the formatting war. Its network effects—VS Code integration, CI/CD defaults, and plugin ecosystem—create a moat that competitors cannot easily cross. However, the next frontier is not human-written code but AI-generated code.

Prediction 1: Prettier will integrate AI-aware formatting within 2 years. The maintainers will either build a 'semantic formatting' mode (using LLMs to detect intent) or partner with tools like Copilot to normalize AI output. The `prettier-plugin-ai` will be the next major plugin.

Prediction 2: Performance will force a rewrite in Rust or Go. As monorepos grow, Prettier's JavaScript bottleneck becomes untenable. Expect a `prettier-core-rs` project (similar to `eslint-plugin-unicorn`'s Rust rewrite) that offers a drop-in replacement with 10x speed.

Prediction 3: The 'config wars' will reignite around AI formatting. Teams will debate whether AI-generated code should be formatted to human standards or left in its raw, context-rich form. Prettier's rigid orthodoxy will be challenged by 'adaptive formatters' that preserve AI's structural choices.

What to watch: The `biomejs/biome` repository (currently 15K stars). If Biome achieves feature parity with Prettier while offering 10x speed and AI integration, it could disrupt Prettier's dominance within 3 years. For now, Prettier remains the default—but defaults can shift.

More from GitHub

Nerfstudio, NeRF 생태계 통합: 모듈형 프레임워크로 3D 장면 재구성 장벽 낮춰The nerfstudio-project/nerfstudio repository has rapidly become a central hub for neural radiance field (NeRF) research 가우시안 스플래팅, NeRF의 속도 장벽을 깨다: 실시간 3D 렌더링의 새로운 패러다임The graphdeco-inria/gaussian-splatting repository, with over 21,800 stars, represents the official implementation of a bMr. Ranedeer AI 튜터: 모든 개인화 학습을 지배하는 하나의 프롬프트Mr. Ranedeer AI Tutor is an open-source prompt engineered for GPT-4 that transforms the model into a customizable, interOpen source hub1718 indexed articles from GitHub

Archive

May 20261281 published articles

Further Reading

Google Java Format: 코드 리뷰 마찰을 없애는 결정론적 도구Google Java Format은 단순한 코드 포맷터가 아닙니다. 코드 리뷰에서 포맷 논쟁을 제거하는 결정론적이고 독단적인 도구입니다. 6,100개 이상의 GitHub 스타와 깊은 IDE 통합을 통해 Java 팀이OpenAI의 Codex 플러그인이 Claude Code 개발자 워크플로우를 어떻게 재편하는가Anthropic의 Claude Code 환경 내에서 OpenAI의 Codex를 활용하는 새로운 플러그인이 등장하여 코드 리뷰와 작업 위임의 자동화를 약속하고 있습니다. 이 통합은 대규모 언어 모델을 개발자 워크플로LazyGit의 터미널 인터페이스가 개발자의 Git 워크플로우를 혁신하는 방법LazyGit은 강력한 Git 명령어와 직관적인 시각적 인터페이스 사이의 간극을 메우는 개발자 도구의 변혁적 힘으로 부상했습니다. 75,000개 이상의 GitHub 스타를 보유하며 매일 증가하는 이 터미널 기반 인터Claude Code Templates가 AI 지원 개발 워크플로우를 표준화하는 방법AI 코딩 어시스턴트의 빠른 도입은 워크플로우 파편화라는 새로운 도전을 야기했습니다. davila7/claude-code-templates 프로젝트는 Claude Code를 구성하고 모니터링하기 위한 포괄적인 CLI

常见问题

GitHub 热点“Prettier at 51K Stars: The Unstoppable Rise of Code Formatting Orthodoxy”主要讲了什么?

Prettier's rise from a side project by James Long in 2017 to a 51,835-star GitHub behemoth represents a fundamental shift in how developers approach code formatting. Unlike linters…

这个 GitHub 项目在“prettier vs biome performance comparison”上为什么会引发关注?

Prettier's core innovation lies in its AST-rewriting pipeline, which differs fundamentally from regex-based or text-based formatters. The pipeline consists of three stages: 1. Parsing: The source code is parsed into an A…

从“how to configure prettier for monorepo”看,这个 GitHub 项目的热度表现如何?

当前相关 GitHub 项目总星标约为 51835,近一日增长约为 0,这说明它在开源社区具有较强讨论度和扩散能力。