5 Commits

Author SHA1 Message Date
yoshiko 03b2b00fb2 Add biome lint rules and restore react-hooks plugin setup (#218)
* docs: add keep-alive option to localized READMEs

* chore(tooling): migrate static checks to biome and oxlint

* chore(tooling): unify lint and typecheck command flow

* chore(tooling): re-enable react-hooks js plugin checks

* chore(tooling): align format scripts with check semantics

* chore(tooling): drop format:check script

* restore knip files
2026-02-20 13:37:47 +09:00
maasa 9b49f6a848 Refactor: Extract file extension utility to shared utils
- Create shared fileUtils.ts with getFileExtension and getFileName functions
- Replace duplicate .split('.').pop()?.toLowerCase() logic across codebase
- Update imports in imageUtils.ts, SimpleSyntaxHighlighter.tsx, PrismSyntaxHighlighter.tsx, and server.ts
- Add null/undefined handling for edge cases
- Update tsconfig.cli.json to include src/utils
- Fix tests to use new utility functions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 00:27:52 +09:00
maasa 76a744b164 Update Node.js requirement to 21+ and ES2022
- Update package.json engines.node to >=21.0.0
- Update TypeScript target and lib to ES2022 in tsconfig.json and tsconfig.cli.json
- Update GitHub Actions to use Node.js 21
- Add Node.js 21 to mise.toml for consistent development environment

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-01 13:02:35 +09:00
Kotaro Chikuba a212b4ee4b TUI (#2)
* feat: add TUI mode for terminal-based diff viewing

- Add React Ink-based terminal UI with --tui option
- Support side-by-side and unified diff views
- Navigate files with Tab/Shift+Tab (with looping)
- Vim-style keybindings (j/k for scroll)
- Default to showing uncommitted changes (working directory)
- Add --staged and --dirty flags for TUI mode
- Share core git-diff functionality between web and TUI
- Display file preview navigation and remaining lines count

Usage:
  reviewit --tui              # Show uncommitted changes
  reviewit --tui --staged     # Show staged changes
  reviewit --tui HEAD~3       # Show specific commit

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

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

* Fix TUI runtime errors and add proper error handling

- Add error handling for empty files array in SideBySideDiffViewer
- Add display for when no files are found
- Add TTY environment check before starting TUI mode
- Prevent crashes when currentFile is undefined

* Improve file navigation display in TUI

- Rename git-diff-simple.ts to git-diff-tui.ts for clarity
- Add 'r' key to reload diff data
- Improve file navigation display with 2-line limit
- Show current file in brackets with surrounding files
- Dim inactive files and handle overflow gracefully
- Update help text to show reload key

* Fix CLI build configuration

- Add explicit noEmit: false and declaration: true
- Restore proper CLI build output to dist/cli/

* Add type definitions for CLI options

- Define CliOptions interface for better type safety
- Remove unsafe any type usage in CLI action handler

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-30 20:37:39 +09:00
maasa b099338b74 feat: ReviewItプロジェクトの初期実装
reviewitプロジェクトを要件に基づいて完全実装

実装済みのTODO項目:
✅ プロジェクトの初期化とディレクトリ構造作成
✅ package.jsonとTypeScript設定の作成
✅ CLIエントリーポイントの実装
✅ Git diff処理のバックエンドAPI実装
✅ Express サーバーの実装
✅ React フロントエンドの実装
✅ Vite設定とビルド環境の構築
✅ GitHub風のdiff UIコンポーネント実装
✅ CSS Modulesでのスタイリング
✅ ESLint, Prettier, TypeScript設定
✅ Vitest 単体テスト環境の構築
✅ lefthook設定とpre-commitフック
✅ インラインコメント機能の実装
✅ コメントプロンプトコピー機能
✅ コメント保存機能(.reviewit/tmp-comments-*.json)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-29 20:10:04 +09:00