Skip to content

feat: add biome formatter#1192

Merged
vrcprl merged 4 commits intomainfrom
feat/add-biome-formatting-support
Oct 1, 2025
Merged

feat: add biome formatter#1192
vrcprl merged 4 commits intomainfrom
feat/add-biome-formatting-support

Conversation

@vrcprl
Copy link
Copy Markdown
Contributor

@vrcprl vrcprl commented Oct 1, 2025

Adds Biome formatter support as an alternative to Prettier, with full backward compatibility.

Changes

Configuration

  • Added formatter field to i18n.json schema (v1.8 → v1.9)

  • Accepts "prettier" | "biome" | undefined

  • Defaults to Prettier when undefined (backward compatible)

    Implementation

  • Created /packages/cli/src/cli/loaders/formatters/ directory structure

  • _base.ts: Shared formatter logic (DRY principle)

  • prettier.ts: Prettier implementation (unchanged behavior)

  • biome.ts: New Biome implementation

  • index.ts: Factory for formatter selection

Dependencies

  • Added @biomejs/js-api@^0.6.2 to production dependencies
  • Added @biomejs/wasm-nodejs@^1.8.3 to production dependencies

Integration

  • Updated 9 bucket types to support formatter option (json, yaml, html, markdown, mdx, typescript, flutter, json-dictionary)
  • Updated 8 command files to pass formatter config from top-level
  • Removed redundant bucket-level formatter indirection

TypeScript

  • Fixed unused parameter warning in config.ts (P_P)

Backward Compatibility

100% backward compatible

  • No formatter field → Uses Prettier if .prettierrc exists, otherwise no formatting
  • No config file found → Gracefully skips formatting
  • All existing functionality preserved

Testing

Verified:

  • Prettier formatting with explicit and implicit config
  • Biome formatting with biome.json
  • Graceful degradation when config files missing
  • Dependencies install correctly in fresh environments

@vrcprl vrcprl merged commit bbc71b9 into main Oct 1, 2025
2 checks passed
@vrcprl vrcprl deleted the feat/add-biome-formatting-support branch October 1, 2025 13:51
17prateek12 pushed a commit to 17prateek12/lingo.dev that referenced this pull request Jan 23, 2026
* feat: add biome formatter

* chore: formatting

* chore: removed console.log

* chore: changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant