Commit d507666
committed
feat: major codebase improvements with biome integration and type safety
## Major Improvements 🚀
- **Linting**: Migrated from ESLint to Biome for better performance and consistency
- **Type Safety**: Removed all `as any` type assertions, improved TypeScript definitions
- **Documentation**: Updated README and CHANGELOG to reflect current API state
- **Code Quality**: Reduced lint warnings by 55% (from 167 to 75)
## Breaking Changes
- Replaced ESLint with Biome for linting and formatting
- Updated TypeScript interfaces for better type compatibility
- Fixed image fallback URL validation for relative URLs
## New Features
- ✨ Comprehensive Biome configuration optimized for Node.js development
- 🎯 Enhanced type definitions with proper interface inheritance
- 🧹 Automatic import organization and Node.js protocol enforcement
- 📊 Better test coverage with Jest globals support
## Technical Improvements
- **Type System**: Fixed interface inconsistencies between IOgImage and IImageMetadata
- **Function Signatures**: Aligned mediaSetup and fallback function types
- **Import Management**: Added proper type imports and removed unused imports
- **Code Style**: Applied consistent formatting and removed unnecessary type casts
## Fixes
- Fixed test failures caused by incorrect `<image>` tags (changed to `<img>`)
- Resolved URL validation issues for relative image paths in fallbacks
- Fixed TypeScript compilation errors with proper interface definitions
- Maintained 100% test coverage (77/77 tests passing)
All functionality preserved while significantly improving code quality and type safety.1 parent 82a2baf commit d507666
File tree
29 files changed
+4696
-2081
lines changed- __tests__
- src
29 files changed
+4696
-2081
lines changedThis file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
3 | 30 | | |
4 | 31 | | |
5 | 32 | | |
| |||
0 commit comments