prettier-compare

Use packages/prettier-compare/ to inspect any differences between Biome and Prettier formatting (including IR output) before shipping formatter changes.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "prettier-compare" with this command: npx skills add biomejs/biome/biomejs-biome-prettier-compare

Purpose

Use packages/prettier-compare/ to inspect any differences between Biome and Prettier formatting (including IR output) before shipping formatter changes.

Prerequisites

  • Run every command from the repository root so relative paths resolve correctly.

  • Use bun (the CLI is a Bun script) and ensure dependencies have been installed.

  • Always pass --rebuild so the Biome WASM bundle matches your current Rust changes.

Common workflows

Snippets passed as CLI args:

bun packages/prettier-compare/bin/prettier-compare.js --rebuild 'const x={a:1,b:2}'

Force a language (useful when the tool cannot infer it from a filename):

bun packages/prettier-compare/bin/prettier-compare.js --rebuild -l ts 'const x: number = 1'

Compare files on disk:

bun packages/prettier-compare/bin/prettier-compare.js --rebuild -f src/example.tsx

Read from stdin (great for piping editor selections):

echo 'const x = 1' | bun packages/prettier-compare/bin/prettier-compare.js --rebuild -l js

Tips

  • Use -l/--language when formatting code without an extension so both formatters pick the correct parser.

  • Use -f/--file for large samples or snapshot tests so you can iterate directly on project fixtures.

  • Reference packages/prettier-compare/README.md for deeper CLI details; mirror any updates here, keeping the hard requirement that commands include --rebuild .

  • Use single quotes for code snippets passed as CLI arguments to avoid shell interpretation issues.

  • "\n" does not get escaped into a newline when passed as a CLI argument. You should write a literal newline or use a file instead.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

type-inference

No summary provided by upstream source.

Repository SourceNeeds Review
General

rule-options

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

biome-developer

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

parser-development

No summary provided by upstream source.

Repository SourceNeeds Review