Skip to content

Oxfmt#9

Merged
Smef merged 2 commits into
mainfrom
oxfmt
May 21, 2026
Merged

Oxfmt#9
Smef merged 2 commits into
mainfrom
oxfmt

Conversation

@Smef
Copy link
Copy Markdown
Owner

@Smef Smef commented May 21, 2026

Change to Oxfmt instead of prettier

Summary by CodeRabbit

  • Documentation

    • Added JavaScript example demonstrating active record-style API usage.
    • Enhanced type safety documentation with additional validation examples.
    • Improved local development guide with package testing instructions.
  • Chores

    • Replaced code formatting tooling for improved performance.
    • Updated development environment configuration and VS Code extension recommendations.

Review Change Stack

Copilot AI review requested due to automatic review settings May 21, 2026 14:28
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
vasta-docs e3a0608 Commit Preview URL

Branch Preview URL
May 21 2026, 02:22 PM

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

The PR migrates the project's code formatting toolchain from Prettier to oxfmt. It introduces oxfmt configuration, updates build scripts and dependencies, integrates the change into CI workflows, updates the VS Code development environment to recommend the oxc extension, and includes supporting documentation updates and version bumps.

Changes

Prettier to Oxfmt Migration

Layer / File(s) Summary
Oxfmt Configuration and Build Tooling
.oxfmtrc.json, package.json
Introduces .oxfmtrc.json with formatting rules (print width 120, Tailwind CSS sorting). Replaces prettier with oxfmt@^0.51.0 in devDependencies and adds fmt and fmt:check scripts; the format script now runs the new formatter.
CI/CD Workflow Update
.github/workflows/format-check.yml
Updates the GitHub Actions format-check workflow to run pnpm fmt:check instead of pnpm prettier:check and relabels the step from "ESLint & Prettier" to "Format Checks".
Development Environment Setup
.gitignore, .vscode/extensions.json
Configures .gitignore to track .vscode/extensions.json as an unignored file. Adds the oxc.oxc-vscode extension recommendation to the VS Code configuration.
Documentation and Metadata Updates
README.md, docs/README.md, docs/content/1.getting-started/1.introduction.md, docs/content/3.contributing/1.local-development.md, package.json, wrangler.toml
Adds an ORM active record API usage example to the README; removes trailing whitespace from two lines in docs/README.md; updates the type-safety screenshot reference; adds "Testing the package locally" section for tarball-based local testing; bumps pnpm from 11.1.2 to 11.1.3; updates wrangler asset directory configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Smef/vasta#5: Prior PR introduced the Prettier check step in the workflow; this PR replaces it with oxfmt.

Poem

A bunny hops through code so neat,
Oxfmt makes formatting sweet! 🐰✨
From Prettier's past, we bid adieu,
New tools arrive to polish anew.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Oxfmt' is concise and directly reflects the main objective of the pull request—migrating from Prettier to Oxfmt as the code formatter. The changeset confirms this with updates to formatting configuration, scripts, and dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch oxfmt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
package.json (1)

49-52: 💤 Low value

Confirm format should fail fast on fmt errors.

pnpm run fmt && pnpm run lint:fix runs oxfmt (write mode) first and only runs ESLint autofix if oxfmt exits 0. Since oxfmt without --check rewrites files in place, a non-zero exit there usually signals a real parse/IO failure — short-circuiting is reasonable. Just calling out: if you ever want both passes to always run regardless of fmt outcome, use ; instead of &&. No change required.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 49 - 52, The package.json "format" script
currently uses "pnpm run fmt && pnpm run lint:fix" which intentionally
short-circuits (runs lint:fix only if fmt exits 0); confirm this is desired, or
if you want both steps to run regardless of oxfmt success change the connector
to a semicolon so "fmt" (script name) and "lint:fix" always execute; note
"fmt:check" remains the check-mode for oxfmt.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 62: The package.json currently lists "eslint-config-prettier" but your
ESLint setup (eslint.config.mjs) still extends it—either keep the devDependency
or remove the extend entry; to fix, decide which approach you want and make both
places consistent: if you want to keep using Prettier rules, leave
"eslint-config-prettier" in package.json and do nothing else, otherwise remove
the "eslint-config-prettier" entry from the "extends" array in eslint.config.mjs
(or remove the package.json devDependency if you remove the extends); reference
the package name "eslint-config-prettier" and the ESLint config file
"eslint.config.mjs" when making the matching change.

---

Nitpick comments:
In `@package.json`:
- Around line 49-52: The package.json "format" script currently uses "pnpm run
fmt && pnpm run lint:fix" which intentionally short-circuits (runs lint:fix only
if fmt exits 0); confirm this is desired, or if you want both steps to run
regardless of oxfmt success change the connector to a semicolon so "fmt" (script
name) and "lint:fix" always execute; note "fmt:check" remains the check-mode for
oxfmt.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1892e741-5f2c-4c4b-bb46-baf6971f57b8

📥 Commits

Reviewing files that changed from the base of the PR and between c81dfd8 and e3a0608.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (12)
  • .github/workflows/format-check.yml
  • .gitignore
  • .oxfmtrc.json
  • .prettierignore
  • .prettierrc
  • .vscode/extensions.json
  • README.md
  • docs/README.md
  • docs/content/1.getting-started/1.introduction.md
  • docs/content/3.contributing/1.local-development.md
  • package.json
  • wrangler.toml
💤 Files with no reviewable changes (3)
  • .prettierrc
  • .prettierignore
  • README.md

Comment thread package.json
@@ -62,8 +62,8 @@
"eslint-config-prettier": "^9.1.2",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -nP -C2 'eslint-config-prettier|"prettier"' --hidden -g '!pnpm-lock.yaml' -g '!node_modules'
fd -H -t f 'eslint.config' --exec cat {}

Repository: Smef/vasta

Length of output: 1026


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== package.json: prettier/oxfmt/devDeps/scripts =="
rg -n '"(prettier|oxfmt|eslint-config-prettier)"' package.json || true
rg -n '"scripts"\s*:' -n package.json || true
cat -n package.json | sed -n '1,140p' | sed -n '1,140p'

Repository: Smef/vasta

Length of output: 3107


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "== eslint config: formatting-related references =="
ls -1 .
fd -H -t f 'eslint.config.*' -a . --exec sed -n '1,200p' {} || true

Repository: Smef/vasta

Length of output: 910


Don’t treat eslint-config-prettier as leftover—ESLint still extends it
eslint-config-prettier@^9.1.2 is still imported and included in extends in eslint.config.mjs, so it’s actively referenced (not dead weight). Remove it only if you also drop eslintConfigPrettier from the ESLint config; otherwise keep the devDependency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 62, The package.json currently lists
"eslint-config-prettier" but your ESLint setup (eslint.config.mjs) still extends
it—either keep the devDependency or remove the extend entry; to fix, decide
which approach you want and make both places consistent: if you want to keep
using Prettier rules, leave "eslint-config-prettier" in package.json and do
nothing else, otherwise remove the "eslint-config-prettier" entry from the
"extends" array in eslint.config.mjs (or remove the package.json devDependency
if you remove the extends); reference the package name "eslint-config-prettier"
and the ESLint config file "eslint.config.mjs" when making the matching change.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Switches the repository’s formatting toolchain from Prettier to Oxfmt and updates CI/editor configuration accordingly, with resulting whitespace-only formatting updates across docs/config files.

Changes:

  • Replace Prettier scripts/dependency with Oxfmt (fmt, fmt:check) and add .oxfmtrc.json configuration.
  • Update GitHub Actions format check workflow to run Oxfmt instead of Prettier.
  • Add VS Code extension recommendation and adjust .gitignore; apply formatter-driven whitespace changes in docs/config.

Reviewed changes

Copilot reviewed 8 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
wrangler.toml Normalizes TOML formatting for the assets directory entry.
README.md Removes an extraneous blank line/whitespace in the example section.
pnpm-lock.yaml Locks new oxfmt dependency and removes prettier.
package.json Replaces Prettier scripts with Oxfmt scripts and updates pnpm version.
docs/README.md Whitespace normalization (trailing spaces removed).
docs/content/3.contributing/1.local-development.md Formatting cleanup (spacing/list numbering normalization).
docs/content/1.getting-started/1.introduction.md Whitespace normalization for markdown content.
.vscode/extensions.json Recommends the Oxc VS Code extension for contributors.
.prettierrc Removed (no longer using Prettier).
.prettierignore Removed; ignore patterns moved to Oxfmt config.
.oxfmtrc.json Adds Oxfmt configuration (print width, ignores, Tailwind sorting settings).
.gitignore Stops ignoring all of .vscode and allows committing extensions.json only.
.github/workflows/format-check.yml Runs pnpm fmt:check (Oxfmt) instead of Prettier in CI.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Smef Smef merged commit f37684f into main May 21, 2026
7 checks passed
@Smef Smef deleted the oxfmt branch May 21, 2026 14:32
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