Skip to content

Format the repository with Oxfmt #253

Open

Description

@taras

Story

As an effectionx contributor, I want the existing formatting commands to use Oxfmt, so the repository can adopt the Oxc toolchain without changing my local or CI workflow.

The contributor commands remain:

pnpm fmt
pnpm fmt:check

pnpm fmt writes the canonical format. pnpm fmt:check verifies it without modifying files.

Current gap

Biome currently owns both formatting and linting. We intend to adopt Oxlint as the host for Effection-specific policy rules, but changing formatting and policy enforcement together would mix mechanical formatting churn with changes in lint behavior.

Moving formatting to Oxfmt first establishes the formatter boundary independently. Biome continues to provide linting until the separate Oxlint migration is delivered.

Contract

Oxfmt becomes the repository’s sole formatter without changing the public formatting commands.

The committed Oxfmt configuration preserves the repository’s effective formatting conventions where Oxfmt defaults differ from Biome. In particular:

  • Formatting uses two-space indentation and an 80-column print width.
  • Oxfmt-only import sorting and package.json sorting remain disabled. Reordering is a separate policy decision.
  • Markdown is excluded. README and policy documents are intended to become executable XMD sources, and formatting fenced code can change their behavior.
  • Generated output, vendored sources, dependency directories, build output, and fixtures whose exact text is under test are excluded.
  • Oxfmt is pinned to an exact version so formatter upgrades produce deliberate, reviewable changes.
  • Editor and CI integrations use the committed Oxfmt configuration rather than independent defaults.

Differences inherent to the two formatter engines are applied as one isolated mechanical migration.

Acceptance

  • pnpm fmt formats the declared source surface with Oxfmt and no longer invokes Biome formatting.
  • pnpm fmt:check checks the same source surface with Oxfmt, performs no writes, and remains the formatting command used by CI.
  • Running pnpm fmt twice is idempotent: the second run produces no tracked changes.
  • A deliberate formatting mutation in a TypeScript file makes pnpm fmt:check fail, and pnpm fmt restores the accepted form.
  • A deliberate whitespace mutation inside an excluded Markdown code fence neither makes pnpm fmt:check fail nor gets rewritten by pnpm fmt.
  • Existing build, typecheck, and test commands continue to pass after the mechanical formatting change.
  • Biome’s lint configuration and lint behavior remain unchanged in this story.

Evidence

The implementation records the output of:

pnpm fmt
pnpm fmt:check
pnpm check
pnpm test
pnpm test:node

CI runs pnpm fmt:check from a clean checkout. The pull request separates configuration and command changes from the mechanical formatting pass so reviewers can distinguish the formatter contract from generated churn.

Dependencies

This story precedes replacing Biome linting with Oxlint. The Oxlint migration then precedes publishing Effection policy rules from @effectionx/lint and migrating the remaining policies to XMD.

Out of scope

  • Compatibility with deno fmt
  • Replacing Biome linting with Oxlint
  • Adding or changing Effection policy rules
  • Migrating policy documents or the README to XMD
  • Formatting Markdown or executable code fences
  • Enabling import or package.json sorting

Activity

  1. changed the title [-]Format the repository with Deno-aligned Oxfmt settings[/-] [+]Format the repository with Oxfmt[/+] on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions