Skip to content

feat: Tailwind CSS + CVA IntelliSense設定を追加 - #374

Closed
keito4 wants to merge 1 commit into
mainfrom
feat/issue-365-tailwind-cva-vscode-settings
Closed

feat: Tailwind CSS + CVA IntelliSense設定を追加#374
keito4 wants to merge 1 commit into
mainfrom
feat/issue-365-tailwind-cva-vscode-settings

Conversation

@keito4

@keito4 keito4 commented Jan 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Tailwind CSS IntelliSense のための classRegex 設定を追加
    • cva() 関数内でのクラス名補完対応
    • cx() 関数内でのクラス名補完対応
  • ファイルネスティングパターンを追加
  • Tailwind CSS IntelliSense 拡張機能を推奨リストに追加

Benefits

  • CVA(Class Variance Authority)を使用するプロジェクトで Tailwind IntelliSense が正しく動作
  • モダンな React/Next.js プロジェクトでの DX 向上

Test plan

  • VS Code で cva() 関数内にカーソルを置いた際に Tailwind クラス補完が動作すること
  • cx() 関数内でも同様に補完が動作すること

Closes #365

🤖 Generated with Claude Code

- tailwindCSS.experimental.classRegex 設定追加
  - cva() 関数内でのクラス補完対応
  - cx() 関数内でのクラス補完対応
- explorer.fileNesting パターン追加
- Tailwind CSS IntelliSense 拡張機能を推奨に追加

Closes #365

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size/XS PR サイズ Extra Small label Jan 22, 2026
@coderabbitai

coderabbitai Bot commented Jan 22, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@keito4 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.


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.

@claude

claude Bot commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

PR Review: Tailwind CSS + CVA IntelliSense設定追加

✅ 総評

このPRは、Tailwind CSS と CVA (Class Variance Authority) を使用するプロジェクトにおける開発体験を向上させる設定追加です。コード品質、実装方針ともに良好です。


📋 詳細レビュー

1. Code Quality ⭐⭐⭐⭐⭐

良い点:

  • .vscode/settings.json の JSON フォーマットが正しい
  • 既存設定との統合が適切
  • 設定値が明確で理解しやすい

改善提案:
なし。問題ありません。


2. Best Practices ⭐⭐⭐⭐

良い点:

改善検討点:

  • File Nesting パターンの検証: .vscode/settings.json:33-40 のファイルネスティングパターンは汎用的ですが、このリポジトリの構成で実際に効果があるか確認が必要です
    • 例: *.ts → capture.js は TypeScript プロジェクトで有効ですが、このリポジトリが JavaScript も含むか確認
    • next.config.*next-env.d.ts は Next.js プロジェクトに特化しています

3. Potential Bugs / Issues ⚠️

classRegex の正規表現について:

.vscode/settings.json:28-31 の正規表現パターンに潜在的な問題があります。

問題点:

  1. ネストした括弧への対応不足: cva() の第1パターン ([^)]*) は、内部にネストした括弧がある場合に正しくマッチしません

  2. 複雑なクラス文字列の処理: 第2パターンは、引用符内に引用符が含まれる場合に誤動作する可能性があります

推奨対策:
実際の使用ケースでテストを行い、問題が発生した場合は正規表現の見直しを検討してください。

ただし、この問題は稀なエッジケースであり、通常の CVA 使用では問題ありません。現状のパターンで開始し、問題が発生したら修正する方針で問題ないでしょう。


4. Performance Considerations ⭐⭐⭐⭐⭐

影響:

  • VS Code 設定の追加のみで、ランタイムパフォーマンスへの影響なし
  • Tailwind IntelliSense の正規表現マッチングは VS Code 内で実行されるため、プロジェクトのビルド・実行には無関係
  • File nesting は UI 表示の最適化であり、パフォーマンス向上に寄与

評価:
パフォーマンス上の懸念はありません。


5. Security Concerns ✅

評価:

  • セキュリティリスクなし
  • 認証情報や機密情報の漏洩なし
  • 設定ファイルのみの変更で、コード実行やネットワークアクセスは発生しない

6. Test Coverage 📊

現状:

  • PR には Test plan のチェックリストがありますが、自動テストは不要(VS Code 設定のため)
  • 手動での動作確認が適切

Test plan の実施確認:
PR 作成者が実際に動作確認を行うことを推奨します。チェックボックスが未チェックのため、確認をお願いします。


7. Documentation 📚

評価:

改善提案:

  • vscode/README.md への言及を検討(ただし、.vscode/settings.json 自体がドキュメントとして機能するため、必須ではない)

🎯 推奨アクション

マージ前に対応すべき項目:

  1. Test plan の実施 (.vscode/settings.json:28-31)

    • cva() 内でのクラス補完を実際に確認
    • cx() 内でのクラス補完を実際に確認
  2. File nesting パターンの妥当性確認 (.vscode/settings.json:33-40)

    • このリポジトリに該当するファイルが存在するか確認
    • 不要なパターンがあれば削除を検討(特に next.config.*.tsx など)

📊 スコアサマリー

項目 評価 コメント
コード品質 5/5 JSON フォーマット、構造ともに適切
ベストプラクティス 4/5 File nesting の妥当性確認が必要
バグリスク 4/5 正規表現のエッジケースに注意
パフォーマンス 5/5 影響なし
セキュリティ 5/5 リスクなし
テストカバレッジ 4/5 手動テストの実施確認が必要

総合評価: ⭐⭐⭐⭐ (4.5/5)


✅ 結論

このPRは全体として高品質であり、マージ推奨です。

指摘した改善点はエッジケースや将来の拡張性に関するものであり、クリティカルな問題ではありません。Test plan の実施確認と File nesting パターンの妥当性確認を行えば、安心してマージできます。

CVA と Tailwind CSS を使用するプロジェクトにおいて、この設定は開発体験を大幅に向上させます。素晴らしい貢献です!


🤖 Reviewed by Claude Sonnet 4.5

@keito4

keito4 commented Jan 22, 2026

Copy link
Copy Markdown
Owner Author

テンプレートとして #376 で対応しました。

@keito4 keito4 closed this Jan 22, 2026
@keito4
keito4 deleted the feat/issue-365-tailwind-cva-vscode-settings branch January 22, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS PR サイズ Extra Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add Tailwind CSS + CVA classRegex VS Code settings

1 participant