Format
Run code formatters to automatically fix code style.
Workflow
1. Discover Format Command
Investigate available commands by checking project files in priority order:
flake.nixwith treefmt: Usenix fmt(preferred for multi-language projects as it handles all formatters)Makefile/justfile: Look forformatorfmttarget- Language-specific formatters:
- TypeScript/JavaScript:
prettier --write .,biome format --write . - Go:
gofmt -w .,goimports -w . - Rust:
cargo fmt - Python:
black .,ruff format .
- TypeScript/JavaScript:
2. Run Formatter
- Run the discovered format command
- If the command fails due to missing dependencies, recommend the appropriate setup (e.g.,
nix develop,npm install) - If no formatter is configured, propose adding one appropriate for the project
Converted and distributed by TomeVault — claim your Tome and manage your conversions.