Skip to content

Add Oxfmt code formatting#79

Merged
marcochavezf merged 6 commits into
mainfrom
rory-peer-review-02c-oxfmt
Jul 3, 2026
Merged

Add Oxfmt code formatting#79
marcochavezf merged 6 commits into
mainfrom
rory-peer-review-02c-oxfmt

Conversation

@roryabraham

@roryabraham roryabraham commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Details

Adds Oxfmt code formatting to the repo:

  • .oxfmtrc.jsontabWidth: 4, singleQuote: true, trailingComma: "all", bracketSpacing: false, arrowParens: "always", printWidth: 190, singleAttributePerLine: true, matching Expensify's established JS/TS formatting conventions. sortImports uses Oxfmt's basic case-insensitive sorting with no custom groups, since this repo has no path aliases.
  • .github/workflows/oxfmt.yml — CI check using oxfmt --check . (Oxfmt has a native check-only mode), matching this repo's existing workflow conventions (blacksmith-2vcpu-ubuntu-2404, pinned action SHAs, path-filtered pull_request trigger).
  • A fmt npm script (oxfmt --write .) and the oxfmt devDependency.
  • Reformatted scripts/verifyPeerReview.ts with npm run fmt (4-space indent, single quotes, no bracket spacing) so the repo stays consistently formatted going forward.

This repo uses Oxfmt (a native Rust formatter) rather than Prettier, consistent with what we now use in App, used here as a reference for config conventions).

Related Issues

https://github.com/Expensify/Expensify/issues/636197

Manual Tests

Ran npm run fmt locally — it formats scripts/verifyPeerReview.ts as expected, and npx oxfmt --check . passes cleanly afterward. Verified the reformatted script still runs correctly.

Linked PRs

N/A

Phase 2c of the #64 split. Diverges from #64's Prettier-based approach
since the team migrated to Oxfmt in the meantime, so this uses Oxfmt
instead (config/CI authored fresh, not extracted from pr-64).

Co-authored-by: Cursor <cursoragent@cursor.com>
@roryabraham roryabraham changed the title Add Oxfmt formatting (Phase 2c of #64 split, using Oxfmt instead of Prettier) Add Oxfmt code formatting Jul 3, 2026
roryabraham and others added 5 commits July 2, 2026 21:23
Include workflow and action YAML in the Oxfmt check while keeping 4-space indentation for JS/TS.

Co-authored-by: Cursor <cursoragent@cursor.com>
The previous filter only matched .js/.ts, missing .mjs/.cjs/.mts/.cts.

Co-authored-by: Cursor <cursoragent@cursor.com>
The previous commit introduced double-quoted strings, but this repo's
.oxfmtrc.json enforces single quotes, which the Oxfmt check itself
would flag.

Co-authored-by: Cursor <cursoragent@cursor.com>
…oxfmt

# Conflicts:
#	package-lock.json
#	package.json
@roryabraham roryabraham requested a review from marcochavezf July 3, 2026 04:35
@roryabraham roryabraham marked this pull request as ready for review July 3, 2026 04:35
@marcochavezf marcochavezf merged commit 014ed66 into main Jul 3, 2026
6 checks passed
@marcochavezf marcochavezf deleted the rory-peer-review-02c-oxfmt branch July 3, 2026 04:39
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.

2 participants