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 for es (missing-translation)
✗ 1 error
! 1 warning
→ Rule details: https://cli.eloqnt.dev/docs/lint-rules/<rule>
→ 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.
To turn individual rules off or change their severity, configure lint.rules in your config.
Rules
| Rule | Severity | Requirement |
|---|---|---|
duplicate-id | error | When messages.path lists multiple folders |
inconsistent-args | error | |
inconsistent-exact-plurals | error | |
invalid-locale | error | |
missing-other-case | error | |
missing-translation | warning | |
orphan-message | error | Needs srcPath, only for next-intl |
structure-mismatch | error | |
superfluous-key | error | |
undefined-key | error | Needs srcPath, only for next-intl |
unreachable-plural-case | error |
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 |