# @hua-labs/eslint-plugin-i18n - AI Documentation
# Version: 0.1.2
# Auto-generated by generate-docs — do not edit manually

package:
  name: "@hua-labs/eslint-plugin-i18n"
  version: "0.1.2"
  description: "ESLint plugin for i18n type safety — missing keys, unused keys, raw text, dynamic keys"
  license: "MIT"

overview: "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 translation analysis."

exports:
  main:
    path: "@hua-labs/eslint-plugin-i18n"
    provides:
      - name: "default"
        type: "plugin"
        description: "Full ESLint plugin object with `rules` and `configs` properties."
      - name: "rules"
        type: "object"
        description: "All six rule implementations keyed by rule name."
      - name: "configs"
        type: "object"
        description: "Named configs currently including `recommended`."
      - name: "rules['no-missing-key']"
        type: "rule"
        description: "Checks literal `t()` / `tArray()` keys against a generated i18n types file and suggests close matches."
      - name: "rules['no-unused-key']"
        type: "rule"
        description: "Documents unused-key awareness in ESLint; use `i18n-lint unused-keys` for project-wide analysis."
      - name: "rules['no-raw-text']"
        type: "rule"
        description: "Warns on hardcoded CJK JSX text and selected attributes; can suggest matching keys from translations."
      - name: "rules['no-dynamic-key']"
        type: "rule"
        description: "Warns on non-literal translation keys so generated-key type safety remains effective."
      - name: "rules['no-unlocalized-field']"
        type: "rule"
        description: "Warns when configured object fields contain literal strings instead of `namespace:key.path` values."
      - name: "rules['prefer-common-key']"
        type: "rule"
        description: "Suggests replacing a namespace-specific key with a `common:` key when both share the same translated value."
      - name: "configs.recommended"
        type: "config"
        description: "Legacy-style recommended config using the `@hua-labs/i18n/...` rule namespace; flat-config users usually copy the README rule set with their chosen plugin alias."

features:
  - "no-missing-key — Detect t() and tArray() keys not found in generated types, with did-you-mean suggestions"
  - "no-raw-text — Catch CJK hardcoded text in JSX text and attributes, with reverse-lookup key suggestions when translationsDir is set"
  - "no-dynamic-key — Warn on non-literal t() / tArray() keys that bypass generated-key type safety"
  - "no-unlocalized-field — Detect metadata fields such as description, label, and value that should contain i18n keys"
  - "prefer-common-key — Suggest common namespace keys when the same translated value already exists there"
  - "no-unused-key — ESLint placeholder for unused-key awareness; use the CLI for project-wide unused-key analysis"
  - "i18n-lint CLI — unused-keys, common-report, and missing commands for project-wide reports"

related_packages:
  - "@hua-labs/i18n-core"
  - "@hua-labs/i18n-core-zustand"

compatibility:
  node: ">=20.0.0"
