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

@i18n-doctor/eslint-plugin

v0.11.8

Published

ESLint plugin for i18n-doctor — reuse the existing analyzer for live lint diagnostics

Downloads

1,104

Readme

@i18n-doctor/eslint-plugin

Beta — v0.11.8 (same version as CLI / language-server / IDE plugins)

ESLint plugin that surfaces i18n-doctor findings in the editor and CI using the same analyzer as the CLI and language server.

No second parser, locale extractor, or project scanner lives in this package — rules call the existing @i18n-doctor/cli pipeline once per ESLint run and map diagnostics to context.report().

ESLint provides diagnostics only. Go to Translation, Hover, and Completion are provided by @i18n-doctor/language-server (via the VS Code and JetBrains extensions). Key existence uses the same catalog + definitionMatchesUsage rules as @i18n-doctor/translation-index, so no-missing-key and the Language Server agree.

Install

npm install -D @i18n-doctor/eslint-plugin eslint

Flat config (recommended)

import i18nDoctor from "@i18n-doctor/eslint-plugin";

export default [
  i18nDoctor.configs.recommended,
];

Lint source and locale catalogs together:

import i18nDoctor from "@i18n-doctor/eslint-plugin";
import json from "@eslint/json";
import tseslint from "typescript-eslint";

export default [
  ...i18nDoctor.configs.recommended,
  {
    files: ["**/*.{js,jsx,ts,tsx}"],
    languageOptions: {
      parser: tseslint.parser,
      parserOptions: { ecmaFeatures: { jsx: true } },
    },
  },
  ...json.configs.recommended,
];

Manual rules

rules: {
  "i18n-doctor/no-missing-key": "error",
  "i18n-doctor/no-unused-key": "warn",
  "i18n-doctor/no-untranslated": "warn",
  "i18n-doctor/no-duplicate-key": "error",
  "i18n-doctor/locale-consistency": "warn",
}

Rules

| Rule | Default | Analyzer source | | --- | --- | --- | | no-missing-key | error | missing-key | | no-unused-key | warn | unused-key | | no-untranslated | warn | untranslated-text | | no-duplicate-key | error | duplicate-key | | locale-consistency | warn | @i18n-doctor/coverage |

Configuration, ignoreKeys, inline suppressions (// i18n-doctor-ignore …), and namespace/locale behavior come from your existing i18n-doctor.config.* — there is no separate ESLint-specific config format, and you do not need to duplicate ignoreKeys in eslint.config.js. The config is resolved relative to the linted project (the same loader the CLI and language server use), so glob patterns apply identically everywhere.

Config without installing i18n-doctor

Prefer JSON or a plain object — no import required:

{ "ignoreKeys": ["SERVER_*", "BACKEND_*"] }
// i18n-doctor.config.js
export default { ignoreKeys: ["SERVER_*", "BACKEND_*"] };

For typed TS configs, import defineConfig from this package (already a dependency):

import { defineConfig } from "@i18n-doctor/eslint-plugin";

export default defineConfig({ ignoreKeys: ["SERVER_*"] });

Overriding rule severity

...i18nDoctor.configs.recommended must be a sibling config entry (not spread into your object). Put severity overrides in a later block:

export default [
  ...i18nDoctor.configs.recommended,
  {
    rules: {
      "i18n-doctor/no-missing-key": "warn",
    },
  },
];

Note: catalog findings (no-unused-key, etc.) are configured for **/*.json by the recommended-locales block — override that file glob separately if needed.

How it works

ESLint rule (per file)
  ↓
Shared analysis session (once per project / ESLint process)
  ↓
analyzeScope() — same pipeline as CLI + language server
  ↓
Filter diagnostics for the current file
  ↓
context.report({ loc, message })

Project-wide rules such as unused keys report on locale catalog files when those files are included in your ESLint run. The analyzer is not re-executed for every source file or rule.

Static ternaries (t(cond ? "A" : "B") and same-file const k = …; t(k)) count as usages — same behavior as the CLI and language server.

Supported files

  • Source: .js, .jsx, .ts, .tsx (and anything the core analyzer already scans)
  • Catalogs: JSON / JS / TS locale layouts discovered by @i18n-doctor/sources

License

MIT