{"enrichment":{"faq":[{"a":"formatter-development teaches you to implement formatting rules by writing FormatNodeRule trait implementations for syntax nodes. You define how each node type should be formatted using Biome's IR-based formatter infrastructure, which handles indentation, line breaks, and spacing. The skill covers generating formatter boilerplate, managing soft and hard line breaks, and handling grouping to control when content wraps across lines.","q":"How do you implement formatting rules in Biome?"},{"a":"Biome's IR-based formatter infrastructure is the core system that formatter-development uses to transform syntax trees into formatted output. It uses an intermediate representation (IR) with formatting primitives like soft_line_break, hard_line_break, and grouping constructs. This approach separates formatting logic from output rendering, making it easier to implement consistent rules across different syntax node types.","q":"What is Biome's IR-based formatter infrastructure?"},{"a":"formatter-development covers handling comments by understanding how Biome's formatter preserves and positions comments within formatted output. The skill addresses dangling comments\u2014comments that appear after code on the same line or in ambiguous positions\u2014and shows how to use formatter rules to ensure comments are placed correctly relative to syntax nodes without breaking idempotency or readability.","q":"How do you handle comments in Biome formatter output?"},{"a":"formatter-development includes using Biome's prettier compare tool to validate your formatter output against Prettier's behavior. This comparison helps identify formatting differences and ensures consistency. The skill teaches snapshot testing and idempotency checks to verify that your formatter produces stable, correct output that matches expected formatting patterns.","q":"How can you compare Biome formatting with Prettier?"},{"a":"formatter-development teaches snapshot tests as a way to validate formatter output by comparing it against stored expected results. Idempotency checks ensure that running the formatter twice on the same input produces identical output\u2014a critical property for any formatter. The skill covers writing these tests using quick_test.rs and debugging failures when output changes unexpectedly.","q":"What are snapshot tests and idempotency checks in formatter-development?"},{"a":"formatter-development shows how to debug idempotency failures by analyzing formatter output across multiple passes. When the formatter produces different results on subsequent runs, you trace the issue through your FormatNodeRule implementations, checking for inconsistent line break placement, grouping logic, or comment handling. The skill teaches using snapshot tests and comparison tools to identify and fix the root cause.","q":"How do you debug and fix formatter idempotency issues?"}],"shadow_tags":["code-formatting","syntax-tree-traversal","ir-generation","test-automation","prettier-compatibility","idempotency-validation","formatter-infrastructure","snapshot-testing","whitespace-handling","ast-transformation"],"summary_rewrite":"Learn to implement and modify Biome's formatters using its trait-based IR system. This skill covers generating formatter boilerplate, writing FormatNodeRule implementations, managing comments in formatted output, and validating your work against Prettier using snapshot tests and idempotency checks."},"files":[{"bytes":10874,"path":".claude/skills/formatter-development/SKILL.md","sha256":"8be442397df2eb650c4fb7cd2ef4184ea96d1fbb82d47bb6760700dc605cdda4","url":"https://skillfed.io/files/biomejs/biome/formatter-development/6183bda8/SKILL.md"}],"id":"biomejs/biome/formatter-development","links":{"html":"https://skillfed.io/biomejs/biome/formatter-development","md":"https://skillfed.io/biomejs/biome/formatter-development.md","repo":"https://github.com/biomejs/biome"},"meta":{"agents_supported":["claude-code"],"first_seen":"2026-07-28","forks":1157,"language":"Rust","last_updated":"2026-07-27","license":"Apache-2.0","name":"formatter-development","publisher":"biomejs","stars":25418},"relations":{"similar":[{"id":"biomejs/biome/biome-developer"},{"id":"biomejs/biome/testing-codegen"},{"id":"bobmatnyc/claude-mpm-skills/biome"},{"id":"oxc-project/oxc/migrate-oxfmt"},{"id":"shipshitdev/skills/linter-formatter-init"},{"id":"delexw/claude-code-misc/oxfmt"},{"id":"haydenbleasel/ultracite/ultracite"},{"id":"managedcode/dotnet-skills/biome"},{"id":"tobihagemann/turbo/review-tooling"},{"id":"shipshitdev/skills/biome-validator"}]},"slug":{"owner":"biomejs","repo":"biome","skill":"formatter-development"},"version":"6183bda8"}
