formatter-development
Installation
SKILL.md
Formatter Development
Use crates/biome_formatter/CONTRIBUTING.md and the language formatter's guide as the canonical architecture references. Inspect neighboring node implementations before selecting IR primitives.
Workflow
- Reproduce the behavior with a focused internal formatter spec or
quick_test. - Inspect the node fields, comments, and nearby formatting rules.
- Implement the smallest layout change using formatter IR.
- Run focused formatter tests and inspect snapshots.
- Compare with Prettier when compatibility is relevant.
- Run formatter codegen for the language, then format and lint.
Node Rules
Generated node rules implement FormatNodeRule. In fmt_fields: