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

@boring-stack-pkg/eslint-plugin-i18n-keys

v0.2.0

Published

ESLint rule: static i18n t() keys must exist in a canonical JSON dictionary.

Readme

eslint-plugin-i18n-keys

npm source

ESLint rule: static t("…") / i18n.t("…") translation keys must exist in a canonical JSON dictionary (nested keys use dot paths).

Install

pnpm add -D @boring-stack-pkg/eslint-plugin-i18n-keys

Peer deps: eslint 8.57 / 9 / 10, @typescript-eslint/parser 8+, typescript 5+.

Use (flat config)

import tsParser from "@typescript-eslint/parser";
import i18nKeys from "eslint-plugin-i18n-keys";

export default [
  {
    files: ["**/*.{ts,tsx}"],
    languageOptions: { parser: tsParser },
    plugins: { "i18n-keys": i18nKeys },
    rules: {
      "i18n-keys/static-translation-key-exists": [
        "error",
        { dictionary: "src/lib/i18n/locales/en/common.json" },
      ],
    },
  },
];

The bundled recommended config enables the same rule; override dictionary to match your repo’s locale file path.

dictionary also accepts an array. The leaf keys of every file are merged, for a namespace whose copy is split between the client bundle and text served at runtime (paid lesson content, remotely managed strings):

{ dictionary: ["src/lib/i18n/locales/en/guide.json", "../api/src/api/courses/content/en/wiring.json"] }

Rules

| Rule | Description | | ------------------------------- | ------------------------------------------------------------------------------------------------- | | static-translation-key-exists | String-literal keys must appear in the JSON dictionary (leaf strings define valid terminal keys). |

Plural and context suffixes

The rule resolves keys the way i18next does, so the call site can use the base key while the dictionary stores the suffixed forms:

| Call | Accepted when the dictionary has | | ------------------------------------------- | ------------------------------------------- | | t("files", { count }) | files_other (or the plain files) | | t("rank", { count, ordinal: true }) | rank_ordinal_other | | t("friend", { context: "male" }) | friend_male (or the plain friend) | | t("guests", { count, context: "vip" }) | guests_vip_other, falling back as i18next |

_other is the fallback every language needs, so it is the form the rule requires; _one, _few, _many and friends are optional extras. A counted call whose _other form is missing reports missingPluralKey naming the expected key. An uncounted call to a plural-only key (t("files")) is still an error, because i18next would render the raw key. Only string-literal context values are resolved; a variable context falls back to the base key.

Development

pnpm install
pnpm test
pnpm build

License

MIT.