eloqnt/cli
eloqnt lint
Catch common problems in your source code and messages with static analysis.
The linter runs fully locally and doesn't require an account.
eloqnt lint
messages/es.json
│
│ "kFvGpR": "Tienes mensajes nuevos"
│ ─┬──────────────────────
│ ╰─ Missing ICU argument: {count} (inconsistent-args)
│
│ "X0ha1a": "Save changes"
│ ─┬────────────
│ ╰─ Missing translation in es.json (missing-translation)
✗ 1 error
! 1 warning
→ Run `eloqnt translate` to fill in 1 missing translation
Errors fail the command with a non-zero exit code, while warnings don’t. Pass --strict if you want to bail on warnings as well.
Rules
| missing-translation | A message in the source locale has no translation in a target locale. |
| superfluous-key | A target locale defines a key that the source locale doesn't. |
| inconsistent-args | A translation's ICU arguments don't match the source message. |
| duplicate-id | A message id is defined in more than one messages folder (when messages.path lists several). |
| orphan-message | A catalog message is never referenced in your source code (next-intl only). |
| undefined-key | Your source code references a key that no catalog defines (next-intl only). |
Flags
| --strict | boolean | Exit with a non-zero code when warnings are found |
| --config | string | Path to the eloqnt config file (defaults to .eloqnt/config.{ts,mts,js,mjs}) |
| --json | boolean | Output the result as JSON |