[PR #30491] chore(web): add ESLint rules for i18n JSON validation #32843

Closed
opened 2026-02-21 20:52:11 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/30491

State: closed
Merged: Yes


Summary

  • Add valid-i18n-keys rule to ensure i18n JSON keys are flat and don't conflict (no key can be a prefix of another key)
  • Add no-extra-keys rule to ensure non-English JSON files don't have keys missing from en-US (with autofix support)
  • Add utility function to handle JSON files with trailing commas

Test plan

  • Run pnpm lint to verify rules work correctly
  • Verify rules catch invalid key structures in JSON files
  • Verify autofix removes extra keys from non-English translations

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/langgenius/dify/pull/30491 **State:** closed **Merged:** Yes --- ## Summary - Add `valid-i18n-keys` rule to ensure i18n JSON keys are flat and don't conflict (no key can be a prefix of another key) - Add `no-extra-keys` rule to ensure non-English JSON files don't have keys missing from en-US (with autofix support) - Add utility function to handle JSON files with trailing commas ## Test plan - [ ] Run `pnpm lint` to verify rules work correctly - [ ] Verify rules catch invalid key structures in JSON files - [ ] Verify autofix removes extra keys from non-English translations 🤖 Generated with [Claude Code](https://claude.com/claude-code)
yindo added the pull-request label 2026-02-21 20:52:11 -05:00
yindo closed this issue 2026-02-21 20:52:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32843