orphan-key
Target key absent from the source.
Default severity: warning
What it checks
A key exists in this target locale but not in the source locale, usually because it was renamed or deleted in the source. It is dead weight at best and a stale message at worst. Delete it or restore the source key.
Example
The English key was renamed; the French file still has the old one. Config used for both runs:
{
"sourceLocale": "en",
"files": [
{
"format": "next-intl-json",
"path": "messages/{locale}.json"
}
]
}Fails
messages/en.json
{
"signIn": "Sign in"
}messages/fr.json
{
"signIn": "Se connecter",
"login": "Connexion"
}Gate output
loginnot in source locale enmessages/fr.json:3
Passes
messages/en.json
{
"signIn": "Sign in"
}messages/fr.json
{
"signIn": "Se connecter"
}Gate output
No orphan-key finding.
Change its severity
{
"checks": {
"orphan-key": "error"
}
}Use "off" to disable it. To hide one finding, add "suppress": ["orphan-key:login"]; a suppress rule that stops matching is reported so it can be removed.