# eslint-plugin-lingui

> ESLint plugin for Lingui

Latest version **0.15.0** (published 2026-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-lingui
pnpm add eslint-plugin-lingui
yarn add eslint-plugin-lingui
bun add eslint-plugin-lingui
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.15.0 |
| Published | 2026-09-04 |
| First published | 2023-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=16.0.0 |
| Dependencies | 2 |
| Unpacked size | 153.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 33 |
| Author | Igor Dolzhenkov |
| Maintainers | linguibot |
| Keywords | eslint, eslintplugin, eslint-plugin, lingui, linguijs, lingui-js |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-lingui
- Repository: https://github.com/lingui/eslint-plugin
- Homepage: https://github.com/lingui/eslint-plugin#readme
- Issues: https://github.com/lingui/eslint-plugin/issues
- npm.io page: https://npm.io/package/eslint-plugin-lingui

## Dependencies (2)

- [micromatch](https://npm.io/package/micromatch.md) ^4.0.8
- [@typescript-eslint/utils](https://npm.io/package/@typescript-eslint/utils.md) ^8.69.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.15.0 (latest) — 2026-09-04
- 0.14.0 — 2026-06-05
- 0.13.1 — 2026-04-14
- 0.13.0 — 2026-04-02
- 0.12.0 — 2026-03-26
- 0.11.0 — 2025-08-20
- 0.10.1 — 2025-04-14
- 0.10.0 — 2025-02-04
- 0.9.0 — 2024-12-23
- 0.8.4 — 2024-12-16
- 0.8.3 — 2024-12-09
- 0.8.2 — 2024-12-05
- 0.8.1 — 2024-11-26
- 0.8.0 — 2024-11-19
- 0.7.0 — 2024-11-04
- … 10 more at https://npm.io/package/eslint-plugin-lingui/versions

## README

# <div align="center">An ESLint Plugin For Lingui<sub>js</sub></div>

<div align="center">

Set of eslint rules for [Lingui](https://lingui.dev) projects <img src="https://img.shields.io/badge/beta-yellow"/>

[![npm](https://img.shields.io/npm/v/eslint-plugin-lingui?logo=npm&cacheSeconds=1800)](https://www.npmjs.com/package/eslint-plugin-lingui)
[![npm](https://img.shields.io/npm/dt/eslint-plugin-lingui?cacheSeconds=500)](https://www.npmjs.com/package/eslint-plugin-lingui)
[![main-suite](https://github.com/lingui/eslint-plugin/actions/workflows/ci.yml/badge.svg)](https://github.com/lingui/eslint-plugin/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/lingui/eslint-plugin/graph/badge.svg?token=ULkNOaWVaw)](https://codecov.io/gh/lingui/eslint-plugin)
[![GitHub](https://img.shields.io/github/license/lingui/eslint-plugin)](https://github.com/lingui/eslint-plugin/blob/main/LICENSE)

</div>

## Installation

You'll first need to install [ESLint](http://eslint.org):

```bash
npm install --save-dev eslint
# or
yarn add eslint --dev
```

Next, install `eslint-plugin-lingui`:

```bash
npm install --save-dev eslint-plugin-lingui
# or
yarn add eslint-plugin-lingui --dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-lingui` globally.

## Flat Config (`eslint.config.js`)

### Recommended Setup

To enable all the recommended rules for our plugin, add the following config:

```js
import pluginLingui from 'eslint-plugin-lingui'

export default [
  pluginLingui.configs['flat/recommended'],
  // Any other config...
]
```

We also recommend enabling the [no-unlocalized-strings](docs/rules/no-unlocalized-strings.md) rule. It’s not enabled by default because it needs to be set up specifically for your project. Please check the rule's documentation for example configurations.

### Custom setup

Alternatively, you can load the plugin and configure only the rules you want to use:

```js
import pluginLingui from 'eslint-plugin-lingui'

export default [
  {
    plugins: {
      lingui: pluginLingui,
    },
    rules: {
      'lingui/t-call-in-function': 'error',
    },
  },
  // Any other config...
]
```

## Legacy Config (`.eslintrc`)

### Recommended setup

To enable all of the recommended rules for our plugin, add `plugin:lingui/recommended` in extends:

```json
{
  "extends": ["plugin:lingui/recommended"]
}
```

### Custom setup

Alternatively, add `lingui` to the plugins section, and configure the rules you want to use:

```json
{
  "plugins": ["lingui"],
  "rules": {
    "lingui/t-call-in-function": "error"
  }
}
```

## Rules

✅ - Recommended

- ✅ [no-expression-in-message](docs/rules/no-expression-in-message.md)
- ✅ [no-single-tag-to-translate](docs/rules/no-single-tag-to-translate.md)
- ✅ [no-single-variables-to-translate](docs/rules/no-single-variables-to-translate.md)
- ✅ [no-trans-inside-trans](docs/rules/no-trans-inside-trans.md)
- ✅ [t-call-in-function](docs/rules/t-call-in-function.md)
- [no-unnamed-tag-placeholders](docs/rules/no-unnamed-tag-placeholders.md)
- [no-unlocalized-strings](docs/rules/no-unlocalized-strings.md)
- [text-restrictions](docs/rules/text-restrictions.md)
- [consistent-plural-format](docs/rules/consistent-plural-format.md)
- [no-plural-inside-trans](docs/rules/no-plural-inside-trans.md)
- [require-explicit-id](docs/rules/require-explicit-id.md)
- [require-implicit-id](docs/rules/require-implicit-id.md)

---
_Source: https://npm.io/package/eslint-plugin-lingui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
