---
source: https://cli.eloqnt.dev/docs/cli/lint
docs_index: https://cli.eloqnt.dev/llms.txt
---

# 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.

```console
$ 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`](https://cli.eloqnt.dev/docs/configuration#lint-rules) in your config.

## Rules

| Rule | Severity | Requirement |
| --- | --- | --- |
| [`duplicate-id`](https://cli.eloqnt.dev/docs/lint-rules/duplicate-id) | `error` | When [`messages.path`](https://cli.eloqnt.dev/docs/configuration#messages-path) lists multiple folders |
| [`inconsistent-args`](https://cli.eloqnt.dev/docs/lint-rules/inconsistent-args) | `error` |  |
| [`inconsistent-exact-plurals`](https://cli.eloqnt.dev/docs/lint-rules/inconsistent-exact-plurals) | `error` |  |
| [`invalid-locale`](https://cli.eloqnt.dev/docs/lint-rules/invalid-locale) | `error` |  |
| [`missing-other-case`](https://cli.eloqnt.dev/docs/lint-rules/missing-other-case) | `error` |  |
| [`missing-translation`](https://cli.eloqnt.dev/docs/lint-rules/missing-translation) | `warning` |  |
| [`orphan-message`](https://cli.eloqnt.dev/docs/lint-rules/orphan-message) | `error` | Needs [`srcPath`](https://cli.eloqnt.dev/docs/configuration#srcPath), only for `next-intl` |
| [`structure-mismatch`](https://cli.eloqnt.dev/docs/lint-rules/structure-mismatch) | `error` |  |
| [`superfluous-key`](https://cli.eloqnt.dev/docs/lint-rules/superfluous-key) | `error` |  |
| [`undefined-key`](https://cli.eloqnt.dev/docs/lint-rules/undefined-key) | `error` | Needs [`srcPath`](https://cli.eloqnt.dev/docs/configuration#srcPath), only for `next-intl` |
| [`unreachable-plural-case`](https://cli.eloqnt.dev/docs/lint-rules/unreachable-plural-case) | `error` |  |

## Flags

| Flag | Type | Description |
| --- | --- | --- |
| `--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 |

---

For an index of every eloqnt/cli documentation page, see [https://cli.eloqnt.dev/llms.txt](https://cli.eloqnt.dev/llms.txt).
