feat: added lingo.dev validate command
Adds new lingo.dev validate command for comprehensive configuration validation before running translations.
Features
Commands
-
lingo.dev validate- Basic validation -
lingo.dev validate --strict- Treat missing target files as errors -
lingo.dev validate --api-key <key>- Include authentication check
Validates
- Configuration file existence and parseability
- Source and target locale formats
- Bucket types support
- Source files existence and readability
- Target files/directories accessibility and permissions
Output
Simple linear format with ✓ (success), ⚠ (warning), ✗ (error)
✓ Configuration file (i18n.json) exists
✓ Source locale 'en' is valid
✓ Target locales ['es', 'fr'] are valid
✓ Bucket type 'json' is supported
✓ Source file exists: src/locales/en/common.json
⚠ Target file missing: src/locales/es/common.json (will be created)
✓ All source files are readable
✓ Target directories are writable
Validation complete: 7 checks passed, 1 warning
Testing
- 9 new tests, all passing
- All existing CLI tests passing
- Build successful with no TypeScript errors
Use Cases
- Pre-translation validation
- CI/CD quality gates
- Configuration debugging
- Team onboarding
- Post-migration validation
Closes #1300
https://github.com/user-attachments/assets/f61813cd-6369-442a-92da-38395b67ff77
@navyansh007 please resolve the comments
Hey @navyansh007! Just checking in - are you still working on this PR? We noticed there are some comments that may need addressing. If you need more time, no problem! Just let us know. If we don't hear back within a week, we'll close this to keep the repo tidy, but you can always reopen when ready.
Closing this PR as stale to keep the repo clean. Feel free to reopen or create a new PR once you're ready to continue. Thanks for your contribution!