{"id":25993,"library":"ngx-translate-lint","title":"ngx-translate-lint","description":"CLI tool to validate ngx-translate translation keys in Angular applications. Version 1.26.5. Uses regex to scan templates and language files for missing keys, zombie keys, empty values, and misprints. Supports glob patterns, config files, and URL-based language files. Differentiated by deep-search and fuzzy matching features. Releases follow semantic versioning on a monthly/quarterly cadence.","status":"active","version":"1.26.5","language":"javascript","source_language":"en","source_url":"https://github.com/romanrostislavovich/ngx-translate-lint","tags":["javascript","ngx-translate","validator","linting","cli","typescript"],"install":[{"cmd":"npm install ngx-translate-lint","lang":"bash","label":"npm"},{"cmd":"yarn add ngx-translate-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add ngx-translate-lint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export for programmatic usage. Works with CommonJS via require().","symbol":"NgxTranslateLint","correct":"import { NgxTranslateLint } from 'ngx-translate-lint'"},{"note":"Function to invoke the CLI programmatically. Accepts same options as command line.","symbol":"cli","correct":"import { cli } from 'ngx-translate-lint'"},{"note":"Type for configuration object used with programmatic API.","symbol":"Configuration","correct":"import { Configuration } from 'ngx-translate-lint'"}],"quickstart":{"code":"// Install globally: npm install -g ngx-translate-lint\n// Run CLI with project and languages paths:\n// ngx-translate-lint --project ./src --languages ./src/assets/i18n --keysOnViews error --zombieKeys warning\n\nimport { NgxTranslateLint } from 'ngx-translate-lint';\n\nconst linter = new NgxTranslateLint({\n  project: './src',\n  languages: './src/assets/i18n',\n  keysOnViews: 'error',\n  zombieKeys: 'warning',\n  emptyKeys: 'disable',\n  misprintKeys: 'disable',\n  deepSearch: 'enable'\n});\n\nlinter.lint().then(result => {\n  console.log('Lint complete. Errors:', result.errors.length, 'Warnings:', result.warnings.length);\n});","lang":"typescript","description":"Shows both CLI usage and programmatic TypeScript API for linting ngx-translate keys."},"warnings":[{"fix":"Update to latest: npm install -g ngx-translate-lint@latest","message":"If using Angular 17+, ensure ngx-translate-lint version is >=1.22.0 to avoid compatibility issues.","severity":"gotcha","affected_versions":"<1.22.0"},{"fix":"Consider local language files for CI performance, or implement a caching proxy.","message":"When loading languages from URL, the tool does not cache responses. Repeated runs will fetch again.","severity":"gotcha","affected_versions":">=1.23.0"},{"fix":"Only enable misprintKeys when needed, and consider increasing --misprintCoefficient to 0.95+ to reduce matches.","message":"The --misprintKeys option can be very slow on large projects because it compares each key with a coefficient.","severity":"gotcha","affected_versions":"all"},{"fix":"Use --deepSearch disable unless you have a strong reason to scan for keys in all files.","message":"The --deepSearch option adds each translation key to a global regex and can be very slow.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install -g ngx-translate-lint` for CLI, or `npm install ngx-translate-lint --save-dev` for programmatic use.","cause":"Package not installed globally or locally.","error":"Error: Cannot find module 'ngx-translate-lint'"},{"fix":"Ensure npm global bin directory is in PATH, or use npx: `npx ngx-translate-lint`","cause":"Global installation may not be on PATH.","error":"ngx-translate-lint: command not found"},{"fix":"Use absolute path or verify relative path from project root. Example: `--languages ./src/assets/i18n`","cause":"Provided --languages path is incorrect or relative path does not resolve.","error":"Error: The path to languages folder does not exist"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}