Skip to content

feat: Biome.jsによるコードフォーマットとリント環境を追加 #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

azu
Copy link
Member

@azu azu commented Jul 6, 2025

概要

このPRでは、Biome.jsを使用したコードフォーマットとリント環境を追加しました。

変更内容

🔧 追加した設定

  • Biome.js設定 (biome.json)

    • JavaScriptとTypeScriptのリンター・フォーマッター設定
    • インデントサイズ: 4スペース
    • 行の最大長: 120文字
    • セミコロン: 常に使用
    • クォート: ダブルクォート
  • Git pre-commitフック (.githooks/pre-commit)

    • lint-stagedを使用してコミット前に自動フォーマット
    • huskyでGitフックを管理

📝 package.jsonの更新

  • lintスクリプト: biome check ./
  • formatスクリプト: biome check --write ./
  • lint-staged設定を追加

🎨 コードフォーマット

  • 既存のJavaScriptファイルをBiomeでフォーマット
  • renovate.jsonをフォーマット

なぜBiome.jsを選んだか

  1. 高速: Rustで実装されており、ESLint + Prettierより高速
  2. 統合ツール: リンターとフォーマッターが統合されている
  3. 設定がシンプル: 1つの設定ファイルで完結
  4. 保守性: 依存関係が少なく、アップデートが簡単

テスト

  • npm run lint でリントが動作することを確認
  • npm run format でフォーマットが動作することを確認
  • ✅ pre-commitフックが正常に動作することを確認
  • ✅ 既存のテストが全てパスすることを確認

🤖 Generated with Claude Code

- Biome.jsの設定ファイル(biome.json)を追加
- lint-stagedとhuskyによるpre-commitフックを設定
- 既存のコードをBiomeでフォーマット
- package.jsonにlintとformatスクリプトを追加

Biome.jsを採用した理由:
- ESLintとPrettierの機能を統合した高速なツール
- 設定がシンプルで保守しやすい
- Rustで実装されており処理が高速

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

changeset-bot bot commented Jul 6, 2025

⚠️ No Changeset found

Latest commit: 49fbf05

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

1 participant