ESLint plugin for Lingui, the internationalization (i18n) framework for JavaScript/TypeScript. Current stable version 0.13.1, released July 2024, with a steady monthly release cadence. It enforces best practices and catches common mistakes in Lingui usage: ensuring translations are called inside functions, no expressions inside message templates, no nested <Trans> components, consistent plural format, and more. Provides both recommended and custom configurations for flat and legacy ESLint configs. Key differentiator: purpose-built for Lingui, with deep integration into its macro system and JSX patterns, unlike generic i18n linters.
Verified import paths — ran on the pinned version, not inferred.
ESM-only since v0.13.0? Actually the package ships both CJS and ESM. CommonJS require is valid but default import is preferred for flat config.
The flat config is under the 'flat/recommended' key. For legacy config, use 'plugin:lingui/recommended' in extends.
As of v0.13, rules that accept options use array syntax; simple rules use string severity. This is standard ESLint.
Flat ESLint config enabling recommended Lingui rules plus custom no-unlocalized-strings and text-restrictions rules.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.