npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rust-ngx-translate-lint

v0.1.8

Published

High-performance Rust port of ngx-translate-lint - check translation files in Angular/ngx-translate projects

Downloads

8

Readme

rust-ngx-translate-lint

A Rust port of ngx-translate-lint for improved performance.

Installation

npm install -g rust-ngx-translate-lint

No dependencies required! Pre-built binaries are included for:

  • Linux (x64, ARM64)
  • macOS (x64, ARM64/Apple Silicon)
  • Windows (x64)

Usage

Command Line

rust-ngx-translate-lint --project "./src/app/**/*.{html,ts}" --languages "./src/assets/i18n/*.json"

Or use the short form:

rust-ngx-translate-lint -p "./src/app/**/*.{html,ts}" -l "./src/assets/i18n/*.json"

Configuration File

You can also use a configuration file (JSON or JS):

rust-ngx-translate-lint --config .ngx-translate-lint.json

Example .ngx-translate-lint.json:

{
  "rules": {
    "keysOnViews": "error",
    "zombieKeys": "warning",
    "misprintKeys": "warning",
    "deepSearch": "enable",
    "emptyKeys": "warning",
    "maxWarning": "6",
    "misprintCoefficient": "0.9",
    "ignoredKeys": [
      "library.targetSystem.*",
      "engineering.signal_configurations.behavior.*",
      "languages.*"
    ],
    "ignoredMisprintKeys": [
      "common.button.*",
      "validation.messages.*"
    ]
  },
  "project": "./src/app/**/*.{html,ts}",
  "languages": "./src/assets/i18n/*.json"
}

Example config.js:

module.exports = {
  rules: {
    keysOnViews: 'error',
    zombieKeys: 'warning',
    misprintKeys: 'warning',
    deepSearch: 'enable',
    emptyKeys: 'warning',
    maxWarning: '6',
    misprintCoefficient: '0.9',
    ignoredKeys: [
      'library.targetSystem.*',
      'engineering.signal_configurations.behavior.*',
      'languages.*'
    ],
    ignoredMisprintKeys: [
      'common.button.*',
      'validation.messages.*'
    ]
  },
  project: './src/app/**/*.{html,ts}',
  languages: './src/assets/i18n/*.json'
};

Options

  • -p, --project - Path to view files (HTML/TS), supports glob patterns (e.g., "./src/app/**/*.{html,ts}")
  • -l, --languages - Path to translation files (JSON), supports glob patterns (e.g., "./src/assets/i18n/*.json")
  • --config - Path to configuration file (JSON or JS)
  • --fix-zombies-keys - Remove unused translation keys
  • --max-warning - Maximum allowed warnings before exiting with error code

Configuration File Options

  • project - Path to view files (same as -p option)
  • languages - Path to translation files (same as -l option)
  • ignore - Array of paths to ignore
  • fixZombiesKeys - Boolean to enable zombie key removal
  • rules.keysOnViews - "error" | "warning" | "disable" - Check for missing translations
  • rules.zombieKeys - "error" | "warning" | "disable" - Check for unused translations
  • rules.emptyKeys - "error" | "warning" | "disable" - Check for empty values
  • rules.misprintKeys - "error" | "warning" | "disable" - Check for potential typos
  • rules.deepSearch - "enable" | "disable" - Enable deep search mode
  • rules.maxWarning - Maximum warnings allowed
  • rules.misprintCoefficient - Threshold for misprint detection (0.0-1.0, default: 0.9)
  • rules.ignoredKeys - Array of key patterns to ignore (supports wildcards like "prefix.*")
  • rules.ignoredMisprintKeys - Array of key patterns to ignore for misprint detection
  • rules.customRegExpToFindKeys - Array of custom regex patterns for key extraction

Features

  • ✅ Detects missing translation keys
  • ✅ Finds unused translation keys (zombies)
  • ✅ Identifies potential typos in translation keys
  • ✅ Supports wildcard patterns for ignored keys
  • ✅ Supports glob patterns for file paths
  • ✅ Configuration file support (JSON/JS)
  • ✅ Compatible with original ngx-translate-lint config format
  • ✅ Fast performance thanks to Rust
  • ✅ Deep search mode for thorough key detection

npm Integration

Add to your package.json:

{
  "scripts": {
    "lint:translations": "rust-ngx-translate-lint --config .ngx-translate-lint.json"
  },
  "devDependencies": {
    "rust-ngx-translate-lint": "^0.1.5"
  }
}

Then run:

npm run lint:translations

Examples

Basic Usage

rust-ngx-translate-lint --project "./src/app/**/*.{html,ts}" --languages "./src/assets/i18n/*.json"

With Configuration File

rust-ngx-translate-lint --config .ngx-translate-lint.json

Remove Zombie Keys

rust-ngx-translate-lint --config .ngx-translate-lint.json --fix-zombies-keys

In npm Scripts

npm run lint:translations

License

MIT