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

@hua-labs/eslint-plugin-i18n

v0.1.2

Published

ESLint plugin for i18n type safety — missing keys, unused keys, raw text, dynamic keys

Readme

@hua-labs/eslint-plugin-i18n

ESLint plugin for i18n type safety — catch missing keys (with did-you-mean), hardcoded text (with key suggestions), dynamic key patterns, unlocalized fields, and common key consolidation. Includes i18n-lint CLI for project-wide analysis.

npm version npm downloads license TypeScript

Features

  • no-missing-key — Detect t() keys not found in generated types + did-you-mean suggestions (up to 3)
  • no-raw-text — Catch CJK hardcoded text in JSX + reverse-lookup key suggestions via translationsDir + ignorePattern
  • no-dynamic-key — Warn on non-literal arguments to t() / tArray()
  • no-unlocalized-field — Detect description/label/value fields with literal strings instead of i18n keys
  • prefer-common-key — Suggest common namespace keys when same value exists there
  • no-unused-key — Placeholder rule for unused translation key detection (CLI recommended)
  • i18n-lint CLI — unused-keys, common-report, missing-translations commands

Installation

pnpm add @hua-labs/eslint-plugin-i18n

Peer dependencies: eslint >=8.0.0

Quick Start

// eslint.config.mjs (flat config)
import i18nPlugin from "@hua-labs/eslint-plugin-i18n";

export default [
  {
    plugins: { i18n: i18nPlugin },
    rules: {
      "i18n/no-missing-key": [
        "error",
        {
          keysFile: "./types/i18n-types.generated.ts",
        },
      ],
      "i18n/no-raw-text": [
        "warn",
        {
          translationsDir: "./lib/translations",
        },
      ],
      "i18n/no-dynamic-key": "warn",
      "i18n/prefer-common-key": [
        "warn",
        {
          translationsDir: "./lib/translations",
        },
      ],
    },
  },
  // Metadata files — ensure description/label/value use i18n keys
  {
    files: ["registry/**/*.ts"],
    plugins: { i18n: i18nPlugin },
    rules: {
      "i18n/no-unlocalized-field": [
        "warn",
        {
          fields: ["description", "label", "value"],
          ignoreParentProperties: ["codeExamples"],
        },
      ],
    },
  },
];

API

| Export | Type | Description | | ------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | default | plugin | Full plugin object with rules and configs properties | | rules | object | All 6 rule implementations keyed by rule name | | configs | object | Named configs — recommended | | rules['no-missing-key'] | rule | Error on t() keys not found in generated types; suggests up to 3 similar keys (Levenshtein) | | rules['no-unused-key'] | rule | Warn on translation keys that appear unused (basic single-file detection; CLI recommended for project-wide) | | rules['no-raw-text'] | rule | Warn on hardcoded CJK text in JSX and checkable attributes (aria-label, placeholder, title, alt, label); suggests matching i18n keys when translationsDir is set | | rules['no-dynamic-key'] | rule | Warn on non-literal arguments to t() / tArray() that bypass type checking | | rules['no-unlocalized-field'] | rule | Warn on object property values (e.g. description, label) that contain string literals instead of i18n key patterns | | rules['prefer-common-key'] | rule | Suggest replacing a namespace-specific key with a common: key when the same translation value exists there; includes autofix | | configs.recommended | config | Enables no-missing-key (error), no-raw-text (warn), no-dynamic-key (warn); others off |

Related Packages

License

MIT — HUA Labs