A CLI tool for validating translation keys in react-i18next projects. v1.3.1 (latest). It scans React views and language JSON files to detect missing keys, zombie keys, empty translations, and misprint keys using regex matching. Offers configurable severity levels (disable/warning/error), deep search, and auto-fix for zombie keys. Differentiators: focused solely on react-i18next, supports URL-based language files, and includes misprint detection. Alternatives like i18next-scanner focus on extraction rather than validation. Released under semantic versioning with monthly updates.
npm install react-i18next-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Scans JSX/TSX files in src and JSON translation files in public/locales, reports missing keys as errors, zombie and empty keys as warnings.
Use deep search only when necessary; consider narrowing the project glob pattern.
Adjust --mc (misprintCoefficient) to a lower value (e.g., 0.8) to reduce false positives.
Explicitly set --kv warning if you want the old behavior.
Use with caution; backup language files before auto-fix.
Verify the path to language files; use --l './public/locales/**/*.json' to match nested files.
Install glob globally or use a recent npm version (>=7) that auto-installs peer dependencies.
Ensure the glob pattern includes file extensions like .jsx, .tsx, .js, .ts. Example: -p './src/**/*.{jsx,tsx}'