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

translint

v0.3.1

Published

Premium i18n quality checker with CLI, scoring, and HTML report.

Readme

Translint

The ESLint of translations.

Premium i18n quality tooling for modern projects. Detect missing keys, unused translations, placeholder mismatches, and generate a premium HTML report your team will actually want to open.

Why Translint

Translation quality should be as enforceable as code quality. This tool brings a lint-like workflow to i18n, with clear feedback, CI-friendly output, and a premium report you can share.

Most translation checks are brittle or noisy. This tool focuses on real issues, clean output, and useful reports that can be used in CI and shared with teams.

What you get:

  • Missing, extra, unused keys
  • Empty/null values, same-as-key values
  • Placeholder mismatches and structural inconsistencies
  • Dynamic key warnings
  • Quality score with breakdowns
  • Premium standalone HTML audit report
  • Auto-fix and sync modes for safe remediation

Quickstart

Run with npx

npx -y translint check

Install

npm install -D translint

Setup wizard (recommended)

npx -y translint init

The wizard auto-detects your project structure, asks the right questions, and generates translint.config.js.

CLI Commands

check

Analyze and print issues.

translint check --format json --fail-on-error

report

Generate a premium HTML report.

translint report --output i18n-report.html --open

score

Compute and print the quality score.

translint score

fix

Apply safe fixes (add missing keys, optionally remove unused).

translint fix --source-lang en --strategy todo --sort

sync

Synchronize all locales from the source language.

translint sync --source-lang en --strategy source

Common Options (all commands)

  • --config <path>: Path to config file
  • --src <path>: Source directory or glob (repeatable)
  • --locales <path>: Locales root directory
  • --source-lang <code>: Reference language
  • --ignore <pattern>: Ignore glob (repeatable)
  • --verbose: Verbose output

Check-specific options

  • --format <pretty|json>
  • --fail-on-error
  • --framework <auto|i18next|next-intl|react-intl|angular>
  • --include-dynamic-warnings

Report-specific options

  • --output <path>
  • --open

Fix/Sync options

  • --strategy <empty|source|todo>
  • --dry-run
  • --sort
  • --remove-unused (fix only)

Configuration

Config file: translint.config.js (or .json, .ts)

module.exports = {
  projectRoot: process.cwd(),
  source: ['src'],
  locales: {
    dir: 'src/i18n',
    extension: '.json',
    fileName: 'trad',
    sourceLang: 'en',
  },
  patterns: {
    prefix: 'trad.',
    functions: ['t', 'i18n.t', 'translate.instant', 'this.translate.instant'],
  },
  ignore: ['**/node_modules/**', '**/dist/**', '**/.git/**', '**/coverage/**'],
  rules: {
    detectEmpty: true,
    detectNull: true,
    detectSameAsKey: true,
    detectUnused: true,
    detectDuplicateTranslations: true,
    detectPlaceholderMismatch: true,
    detectStructureMismatch: true,
  },
  report: {
    title: 'i18n Quality Report',
    darkMode: true,
  },
  fix: {
    strategy: 'todo',
    placeholder: 'TODO_TRANSLATE',
    sort: true,
  },
};

If you decide not to auto-load config during init, run:

translint check --config path/to/translint.config.js

AST Coverage

Currently supported call patterns:

  • t('key')
  • i18n.t('key')
  • translate.instant('key')
  • this.translate.instant('key')

Literal trad.* strings are also detected.

Report Output

The HTML report is a single, portable file with:

  • KPI cards
  • Score ring
  • Severity badges
  • Detailed issues table
  • Recommendations

CI Example

translint check --format json --fail-on-error

Roadmap

  • Framework adapters (Next.js, react-intl, angular templates)
  • Pluralization consistency
  • Richer dynamic key inference
  • Report theming and branding

License

MIT