Skip to content

chore: ESLint から Biome へ一元化(#45)#70

Merged
yk-lab merged 1 commit into
mainfrom
chore/biome
Jul 5, 2026
Merged

chore: ESLint から Biome へ一元化(#45)#70
yk-lab merged 1 commit into
mainfrom
chore/biome

Conversation

@yk-lab

@yk-lab yk-lab commented Jul 4, 2026

Copy link
Copy Markdown
Owner

概要

#45 の評価結果として Biome 一元化を採用。lint + format を Biome(Rust 単一ツール)に統合し、欠けていたフォーマッタを導入する。現行 ESLint は typescript-eslintrecommended(type-aware 未使用)+ no-explicit-any のみという軽量構成だったため、移行で失うルールが少なく低コスト。

変更内容

  • biome.json(新規): preset: recommended + noExplicitAny: error。既存 style に合わせ indentStyle: space / indentWidth: 2 / lineWidth: 100 / quoteStyle: singleuseIgnoreFile + !dist/!coverage で除外。organizeImports 有効
  • package.json: lintbiome check . に、formatbiome format --write)を追加、lint:fixbiome check --write に。eslint / @eslint/js / typescript-eslint を devDependencies から削除
  • eslint.config.mjs を削除
  • CLAUDE.md: Commands を Biome に更新
  • src / tests(10ファイル): Biome で一度フォーマット + import 整理(整形・並べ替えのみ、ロジック無変更
  • src/main.ts: ユーザーに提示する ${{ github.token }} リテラルに noTemplateCurlyInStringbiome-ignore(false positive を個別抑制)
  • TODO.md: [chore] Biome 導入を評価 #45 を解決済みへ

検証

  • pnpm run all(typecheck + biome check + 95 tests + build)green
  • ci.ymlpnpm run lint を呼ぶだけなので変更不要(CI で biome が走る)
  • Biome はバージョンピン(2.5.2)で自己完結 → ローカルと CI で同一結果
  • codex セカンドオピニオン:runtime 挙動不変・correctness 問題なし

参照

🤖 Generated with Claude Code


Summary by cubic

Switch the repo from ESLint to Biome to unify linting and formatting. Style is preserved with no runtime changes; CI still runs pnpm run lint (now Biome).

  • Refactors

    • Add biome.json (recommended preset, noExplicitAny=error, 2-space indent, width 100, single quotes, ignores dist/coverage, organizes imports).
    • Update scripts: lint -> biome check ., add format (biome format --write .), lint:fix -> biome check --write; docs updated (CLAUDE.md).
    • Format src/tests and organize imports only; no logic changes.
    • Add // biome-ignore for noTemplateCurlyInString on the literal ${{ github.token }} message.
    • Remove eslint.config.mjs; mark [chore] Biome 導入を評価 #45 resolved in TODO.md.
  • Dependencies

    • Add @biomejs/biome@2.5.2 (pinned).
    • Remove eslint, @eslint/js, typescript-eslint.

Written for commit dc19078. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af691c7c-d98b-411d-a5c2-0850a20c97ec

📥 Commits

Reviewing files that changed from the base of the PR and between 71442cd and dc19078.

⛔ Files ignored due to path filters (3)
  • biome.json is excluded by !**/*.json
  • package.json is excluded by !**/*.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/*.yaml
📒 Files selected for processing (13)
  • CLAUDE.md
  • TODO.md
  • eslint.config.mjs
  • src/download.ts
  • src/github.ts
  • src/main.ts
  • src/platform.ts
  • src/version.ts
  • tests/checksum.test.ts
  • tests/github.test.ts
  • tests/proxy.test.ts
  • tests/url-guard.test.ts
  • tests/version.test.ts
💤 Files with no reviewable changes (1)
  • eslint.config.mjs
✅ Files skipped from review due to trivial changes (12)
  • src/github.ts
  • CLAUDE.md
  • tests/version.test.ts
  • src/platform.ts
  • TODO.md
  • tests/url-guard.test.ts
  • src/version.ts
  • src/download.ts
  • tests/checksum.test.ts
  • tests/proxy.test.ts
  • tests/github.test.ts
  • src/main.ts

📝 Walkthrough

Summary by CodeRabbit

  • Documentation

    • 開発用コマンドの案内を更新し、lint と format の実行手順を最新のチェック方法に合わせました。
    • バックログの状態を整理し、完了済みの項目を反映しました。
  • Chores

    • 既存の設定やテスト、コードの書式を整理しました。
    • 動作内容に変更はありません。

Walkthrough

ESLint 設定を廃止し、Biome による lint/format に移行するための変更です。CLAUDE.md と TODO.md を更新し、src と tests 配下の複数ファイルで import 順序やコード整形を行っています。ロジックや公開インターフェースの変更はありません。

Changes

Biome 移行

Layer / File(s) Summary
ドキュメントと設定履歴
CLAUDE.md, TODO.md
lint/format コマンドの説明を Biome ベースに更新し、TODO の Issue #45 を解決済みに移動。
src 配下の整形
src/download.ts, src/github.ts, src/main.ts, src/platform.ts, src/version.ts
import 順の入れ替え、関数シグネチャ・呼び出し引数の複数行化、エラーメッセージ表記の調整など、動作を変えない整形。
tests 配下の整形
tests/checksum.test.ts, tests/github.test.ts, tests/proxy.test.ts, tests/url-guard.test.ts, tests/version.test.ts
import 順の入れ替え、引数や配列の複数行化、PermanentError アサーションの表記変更など、テスト挙動を変えない整形。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • yk-lab/setup-task#6: 同じ src/download.tssrc/github.tssrc/platform.tssrc/version.ts とそのテストの整形を扱っています。
  • yk-lab/setup-task#30: src/main.tsresolveFromCache 周辺に触れており、今回の整形対象と重なります。

Poem

ぴょんと跳ねて設定変える、ESLintにさよなら
Biomeさんこんにちは、一つの箱で lint も format も
import の並びも整えて、うさぎはご満悦 🐰
コードはきれいに、心も軽やか
さあ次のニンジン畑へ跳んでいこう 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Biome移行の主要要件は示されていますが、biome.json と package.json が除外されており必須変更の実装有無を確認できません。 biome.json(!/*.json)と package.json(!/*.json)がレビュー対象外のため、設定追加と scripts 更新の達成可否を確認できるよう除外を外してください。
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 変更の主軸である ESLint から Biome への移行を簡潔に表しており、タイトルとして明確です。
Description check ✅ Passed Summary、Related issue、Test plan に相当する情報があり、Biome 移行の概要と検証結果も記載されています。
Out of Scope Changes check ✅ Passed 整形、import整理、Biome関連設定の更新・削除に留まり、目的外の機能変更や追加作業は見当たりません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/biome

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.

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.18%. Comparing base (6bfeb19) to head (dc19078).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/main.ts 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
- Coverage   72.55%   72.18%   -0.38%     
==========================================
  Files          13       13              
  Lines         266      266              
  Branches       67       68       +1     
==========================================
- Hits          193      192       -1     
- Misses         64       65       +1     
  Partials        9        9              
Files with missing lines Coverage Δ
src/download.ts 89.65% <100.00%> (-0.35%) ⬇️
src/github.ts 91.56% <ø> (ø)
src/platform.ts 100.00% <100.00%> (ø)
src/version.ts 91.66% <100.00%> (ø)
src/main.ts 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

lint + format を Biome(Rust 単一ツール)に統合し、欠けていたフォーマッタを
導入。現行 ESLint は type-aware 未使用の軽量構成だったため移行コストは小さい。

- biome.json(新規): recommended + noExplicitAny=error、既存 style に合わせ
  space/2/lineWidth 100/single-quote、useIgnoreFile で dist/coverage 除外
- package.json: lint を biome check に、format を追加、lint:fix を biome に。
  eslint / @eslint/js / typescript-eslint を devDependencies から削除
- eslint.config.mjs を削除
- CLAUDE.md: Commands を biome に更新
- src/tests: biome で一度フォーマット + import 整理(差分は整形のみ)
- main.ts: ユーザーに見せる `${{ github.token }}` リテラルに
  noTemplateCurlyInString の biome-ignore(false positive)
- TODO.md: #45 を解決済み(#69)へ

pnpm run all(typecheck + biome check + 95 tests + build)green を確認。
ci.yml は `pnpm run lint` を呼ぶだけなので変更不要。

Closes #45

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AECzAv2vcdATecuvLjBSa6
@yk-lab

yk-lab commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@yk-lab yk-lab merged commit 86c9a15 into main Jul 5, 2026
20 checks passed
@yk-lab yk-lab deleted the chore/biome branch July 5, 2026 14:04
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] Biome 導入を評価

1 participant