Important: This project uses pnpm instead of npm for package management. Always use pnpm commands when working with this codebase:
- Install dependencies:
pnpm install - Run tests:
pnpm test - Run linting:
pnpm lint - Build the project:
pnpm build
- Uses Vitest for testing framework
- Comprehensive test coverage including edge cases
- Tests cover both positive and negative scenarios
- Mock-friendly architecture for testing
- Uses Biome for linting and formatting
- TypeScript for type safety
- Follows consistent code style and patterns
- Error handling with graceful fallbacks
- Extends Hookified for event-driven extensibility
- Uses dependency injection for network client
- Immutable configuration patterns
- Defensive programming with validation
- Implement the feature in the main Toggle class
- Add comprehensive unit tests
- Update TypeScript types as needed
- Run
pnpm testto ensure all tests pass - Run
pnpm lintto check code quality