"매 opinionated formatter — 매 bikeshed 종결자". Prettier 매 AST re-print 방식 사용 — 매 source 의 whitespace 무시 의 deterministic output 생성. 2026 매 v3.x 의 ESM-first + plugin ecosystem 안정화.
매 핵심
매 Re-print 방식
매 parser 의 source → AST 변환.
매 printer 의 AST → IR (Doc) 생성.
매 IR 의 line-width constraint 기반 layout 결정.
매 original whitespace 의 X 보존.
매 ESLint 와의 분리
ESLint: 매 code quality (logic, anti-patterns).
Prettier: 매 formatting (whitespace, quote, line-break).
매 eslint-config-prettier 의 conflict rule disable.
매 응용
매 monorepo 의 unified formatting.
CI 의 --check mode — 매 format violation 의 fail.
Pre-commit hook (lint-staged + husky) 의 auto-format.
언제: JS/TS/JSON/MD/YAML/CSS — 매 multi-language project 의 unified formatting.
언제 X: 매 Rust/Go (rustfmt/gofmt 의 사용), 매 single-language Rust-only 의 Biome 고려.
❌ 안티패턴
ESLint 의 stylistic rules + Prettier 동시 사용: 매 conflict 발생 → eslint-config-prettier 적용.
.prettierrc 의 commit X: 매 team 의 inconsistent format.
Format-on-save 의 X + manual format: 매 review noise 증가.
매 large initial format 의 main branch 직접 commit: blame 의 손상 — 매 .git-blame-ignore-revs 사용.