Automated detection and fixing of deprecated React APIs with 70% auto-fix coverage.
Built with TypeScript AST parsing using ts-morph for safe, production-ready code transformations.
- 🎯 Detects 19+ deprecated React APIs (lifecycle methods, legacy APIs, UNSAFE_ methods)
- 🔧 Automated fixes for 7 common patterns
- 🛡️ Safe transformations - marks complex cases for manual review
- 📊 Confidence scoring - High/Medium/Low classification
- 🔒 Dry-run mode - Preview changes before applying
- ⚡ Fast - Scans 100+ files in seconds
- 📁 Batch processing - Handles entire projects
Project tested on React-Google-Maps
final.clip.mp4
Important folders :
- cli/src
- cli/test - testing files
Important files : File 1 - deprecated-apis.json : contains list of deprecated apis File 2 - detector.ts : detects deprecated apis File 3 - fix-generator.ts : transforms code to fix deprecated apis File 4 - index.ts : main/entry file
Run the following :
npm run fix -- "./src/**/*.{tsx,jsx}" --dry-run