Repository navigation
Ink Migration Phase 7: Lint fixes and code quality improvements - #2
Merged
Merged
Conversation
- Refactor TUIHandler to Effect.Service pattern with all interactive methods - Enhance ink-wrapper.ts with proper resource management using try-finally - Create Ink component library with Input, Select, MultiSelect, Confirm, Password, Spinner, ProgressBar, Message components - Add component-level tests using ink-testing-library - Update test fixtures with proper TUIError handling - Move error types to types.ts for centralized error management - Update ESLint config with React/JSX support - Add InkError type with proper error reasons This is Phase 2-3 of the v2.0.0 major Ink migration, introducing React-based interactive terminal UIs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
**Phase 5: Comprehensive Component Tests** - Add Input.test.tsx with validation, error handling tests (7 test cases) - Add Select.test.tsx with navigation and choice rendering (8 test cases) - Add MultiSelect.test.tsx with selection state and count (10 test cases) - Add Confirm.test.tsx with default handling (10 test cases) - Add Password.test.tsx with masking and validation (8 test cases) - Use ink-testing-library for proper component testing **Phase 6: Documentation & Examples** - Create examples/basic-prompts.ts - User registration workflow - Create examples/progress-demo.ts - Spinner and progress indicators - Create examples/multi-step-wizard.ts - Complex multi-step form - Comprehensive MIGRATION_GUIDE.md from v1.x to v2.0.0 - Quick reference for all changes - Detailed step-by-step migration instructions - Before/after code examples for each component type - Complete workflow migration example - Service instantiation pattern explanation Total test cases added: 43 test cases across 5 component test files Examples created: 3 runnable example files demonstrating real workflows Documentation: 500+ lines of migration guidance with examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive v2.0.0 release notes covering: - Major breaking changes summary - 8 new Ink React components - Effect.Service architecture refactoring - 43+ component tests - 3 example workflows - Complete MIGRATION_GUIDE - Dependency changes (+7 new, -2 removed) - Deprecation notices - Migration path for v1.x users This completes Phase 7 of the Ink migration project. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Migrate EffectCLI from forbidden Context.Tag to Effect.Service pattern - Fix all import statements to use named imports (prevent Context import) - Add proper type annotations to async operations and callbacks - Prefix unused function parameters with underscore (_) - Fix React component prop types and optional type declarations - Wrap switch case block variable declarations in braces - Refactor MultiSelect component to avoid any-typed props - Update ESLint config to allow intentional console.log usage - Extend tsconfig.test.json to include .tsx files - Export new Output service utilities from index.ts - Remove deprecated EffectCLILive export Build and type-check validation: - ✅ TypeScript compilation: 0 errors - ✅ ESLint (src): 0 errors, 0 warnings - ✅ Build successful with proper type declarations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR completes Phase 7 of the Ink migration with comprehensive lint error resolution and code quality improvements. All TypeScript and ESLint validation rules are now satisfied.
Key Changes
Architecture Improvements
EffectCLIfrom forbiddenContext.Tagto modernEffect.Servicepattern per CLAUDE.md requirementsOutput,OutputTest, andcreateCustomOutputto public APIType Safety & Code Quality
as unknownchainsConfiguration & Testing
console.log()usage in display functionstsconfig.test.jsonto include.tsxfilesanytypesValidation Results
Type-check: ✅ TypeScript compilation - 0 errors
Build: ✅ ESM + Type declarations successful
Lint: ✅ All src files - 0 errors, 0 warnings
Files Modified
src/cli.ts,src/types.ts,src/tui.ts,src/effects/ink-wrapper.tssrc/components/*.tsx- improved prop typingsrc/core/*.ts,src/display.ts,src/progress/spinner.ts,src/tables/table.ts__tests__/fixtures/test-layers.ts,__tests__/colors.test.ts,__tests__/unit/cli-service.test.ts.eslintrc.json,tsconfig.test.json,src/index.tsTest Plan
bun run type-check- verify TypeScript compilation (0 errors)bun run build- verify ESM and type declaration buildsbun run lint- verify ESLint compliance (src files only)bun test- verify all tests pass🤖 Generated with Claude Code