type-mismatch: JSON type mismatch between locales
warning — advisory, exit 0
The same key holds different JSON types in source and translation — a string where the source has an object, an array where the source has a string. Whatever reads the file will hit the wrong shape at runtime.
What triggers it
// en.json
{ "menu": { "open": "Open", "close": "Close" } }
// it.json
{ "menu": "Apri" } // object flattened to a stringFixed
// it.json
{ "menu": { "open": "Apri", "close": "Chiudi" } }Why it matters
Type mismatches usually mean a hand edit or a bad merge mangled the file structure — and they break code, not just copy.
How to fix it
Mirror the source structure in the translation file.
How to silence it
--ignore-keys for structures that intentionally differ (rare).
Check for this in CI
npx @shipi18n/cli check ./locales -s en
# SARIF for inline PR annotations:
npx @shipi18n/cli check ./locales -s en -r sarif -o shipi18n.sarifThe structural checks need no API key. Findings of this rule link back to this page from the SARIF helpUri.
Related rules
- invalid-json — broken JSON in a translation file
- orphan-key — translation keys that no longer exist in the source