Skip to content

build: switch the formatter from Prettier to oxfmt - #4275

Merged
KATO-Hiro merged 10 commits into
stagingfrom
#4274
Nov 1, 2026
Merged

KATO-Hiro merged 10 commits into
stagingfrom
#4274

Conversation

@KATO-Hiro

@KATO-Hiro KATO-Hiro commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

close #4274

Summary by CodeRabbit

  • 開発者向け改善
    • コード整形ツールを Oxfmt に切り替え、エディター設定やコミット前の自動整形にも反映しました。
    • 整形ルールを設定し、対象外とするファイルを指定しました。
    • 開発環境で OXC 拡張機能を利用できるようにしました。

KATO-Hiro and others added 10 commits November 1, 2026 07:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#2226)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2226)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@KATO-Hiro KATO-Hiro left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

LGTM

@KATO-Hiro
KATO-Hiro merged commit 3eb7ead into staging Nov 1, 2026
@KATO-Hiro
KATO-Hiro deleted the #4274 branch November 1, 2026 09:46
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between aea72aa and 8c8ea2f.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
Files selected for processing: 13
  • .devcontainer/devcontainer.json
  • .devcontainer/init-firewall.sh
  • .oxfmtrc.json
  • .prettierignore
  • .prettierrc
  • AGENTS.md
  • CONTRIBUTING.md
  • docs/dev-notes/2026-03-27/atcoder-verified-voting/plan.md
  • lefthook.yml
  • package.json
  • prettier.config.js
  • src/features/workbooks/utils/workbook_tasks.ts
  • src/lib/contests/fixtures/contest_name_and_task_index.ts
Files with no reviewable changes: 3
  • prettier.config.js
  • .prettierignore
  • .prettierrc

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

Prettierをoxfmtに置き換えました。oxfmtの設定、実行コマンド、コミット前処理、Dev Containerのエディター設定を更新し、Prettierの設定と依存関係を削除しました。

Changes: oxfmtへの移行

Layer / File(s) Summary
フォーマッター設定と整形結果
.oxfmtrc.json, .prettierignore, .prettierrc, prettier.config.js, docs/dev-notes/.../plan.md, src/features/workbooks/utils/workbook_tasks.ts, src/lib/contests/fixtures/contest_name_and_task_index.ts
oxfmtの書式設定、Svelteの関連付け、対象外パターンを追加しました。Prettierの設定を削除し、整形結果に差が出たコードとドキュメントの折り返しを更新しました。
コマンドとコミット前処理
package.json, lefthook.yml, AGENTS.md, CONTRIBUTING.md
lint、format、Lefthookの整形コマンドをoxfmtに変更しました。開発依存関係と、整形規則に関する説明も更新しました。
開発環境のエディター設定
.devcontainer/devcontainer.json, .devcontainer/init-firewall.sh, CONTRIBUTING.md
Dev Containerの既定フォーマッターと推奨拡張機能をOxcに変更しました。ファイアウォールの許可リストと拡張機能の管理手順も更新しました。

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Merge Risk: Minimal · up to 8c8ea

The formatter migration is mergeable; no current-head regression requiring changes was established.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed タイトルは、Prettierからoxfmtへのフォーマッター移行という変更の主目的を正確かつ簡潔に示しています。
Linked Issues check Passed [#4274] Prettier から oxfmt への移行に関する主な要件は、変更内容の要約で確認できた。

- 依存関係: package.json で oxfmt を追加し、prettier、prettier-plugin-svelte、prettier-plugin-tailwindcss、eslint-config-prettier を削除。
- 設定: `.ox…
Out of Scope Changes check Passed 変更されたファイルは、すべて #4274 の要件または整形差分に対応する。

- .devcontainer/devcontainer.json、.devcontainer/init-firewall.sh: エディターの既定 formatter と拡張機能の許可リストの変更。要件に一致。
- .oxfmtrc.json、package.json、lefthook.yml: f…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

[#4274] Prettier から oxfmt への移行に関する主な要件は、変更内容の要約で確認できた。

  • 依存関係: package.json で oxfmt を追加し、prettier、prettier-plugin-svelte、prettier-plugin-tailwindcss、eslint-config-prettier を削除。
  • 設定: .oxfmtrc.json を追加。Prettier 相当の書式、.svelte の扱い、生成物などの除外を定義。
  • 旧設定: .prettierrc、.prettierignore、prettier.config.js を削除。
  • script と lefthook: lint と format を oxfmt に切り替え。lefthook は --no-error-on-unmatched-pattern を使用。
  • エディターと firewall: oxc.oxc-vscode を既定の formatter に設定。esbenp を削除し、oxc を追加。
  • 整形差分: Prettier と異なる出力だった 3 ファイルを整形し直し。
  • lint 方針: この PR は ESLint・oxlint の設定に layout ルールを追加しない。AGENTS.md と CONTRIBUTING.md に方針を記載。

確認の限界:

  • 要約には次の値の個別の記載がない: oxfmt の exact 版指定(0.75.0)、sortPackageJson: false、sortImports と sortTailwindcss の無効化、prisma/migrations/migration_lock.toml の除外。これらは PR 説明と要約からの推定であり、ファイルの値は直接確認していない。
  • pnpm-lock.yaml は除外対象のため確認していない。

非コードの作業(手動確認、cross-review、後続作業)は評価対象外。

Full details: Out of Scope Changes check

Explanation

変更されたファイルは、すべて #4274 の要件または整形差分に対応する。

  • .devcontainer/devcontainer.json、.devcontainer/init-firewall.sh: エディターの既定 formatter と拡張機能の許可リストの変更。要件に一致。
  • .oxfmtrc.json、package.json、lefthook.yml: formatter の導入、script、hook の切り替え。要件に一致。
  • .prettierrc、.prettierignore、prettier.config.js: 旧 Prettier 設定の削除。要件に一致。
  • AGENTS.md、CONTRIBUTING.md: 整形の担当と layout ルールの方針の文書化。要件に一致。
  • docs/dev-notes/2026-03-27/atcoder-verified-voting/plan.md、src/features/workbooks/utils/workbook_tasks.ts、src/lib/contests/fixtures/contest_name_and_task_index.ts: oxfmt と Prettier の差分に伴う整形のみ。処理内容の変更はない。

低影響の項目:

  • 整形差分の 3 ファイルは、要件の「Prettier の出力に揃える」に含まれる。
  • 無関係な機能変更、宣言の変更は要約に含まれない。
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files. (7 skipped: 7 unsupported.)

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

This branch was successfully deployed

1 active deployment
preview — 8c8ea2f8 Deployed Nov 1, 2026 by KATO-Hiro via preview #9193
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.

chore(deps): migrate Prettier to oxfmt

1 participant