# eslint-plugin-i18next

> ESLint plugin for i18n

Latest version **6.1.5** (published 2026-06-28) · ISC license · 0 weekly downloads

## Install

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

## Health

**Score 60/100 (C)** — status: active.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 6.1.5 |
| Published | 2026-06-28 |
| First published | 2019-03-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=18.10.0 |
| Dependencies | 1 |
| Unpacked size | 30.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 177 |
| Author | edvardchen |
| Maintainers | edvardchen |
| Keywords | eslint, eslintplugin, eslint-plugin, i18n, i10next, internationalization, localization |

## Links

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

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ~1.1.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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 6.1.5 (latest) — 2026-06-28
- 6.0.0-2 (next) — 2022-05-15
- 6.1.4 — 2026-04-15
- 6.1.3 — 2025-07-20
- 6.1.2 — 2025-07-07
- 6.1.1 — 2024-11-24
- 6.1.0 — 2024-09-14
- 6.0.9 — 2024-07-13
- 6.0.7 — 2024-07-07
- 6.0.3 — 2023-06-14
- 6.0.2 — 2023-06-06
- 6.0.1 — 2023-05-05
- 6.0.0 — 2023-04-26
- 6.0.0-8 — 2023-03-23
- 6.0.0-7 — 2023-03-20
- … 41 more at https://npm.io/package/eslint-plugin-i18next/versions

## README

# eslint-plugin-i18next

ESLint plugin for i18n

> For old versions below v6, plz refer [this document](./v5.md)

## Installation

```bash
npm install eslint-plugin-i18next --save-dev
```

## Usage

For ESLint 9 flat configuration,

```js
// eslint.config.mjs
import i18next from 'eslint-plugin-i18next';

export default [
  // your other configs
  i18next.configs['flat/recommended'],
];
```

For ESLint 8 and below,

```json
// .eslintrc
{
  "extends": ["plugin:i18next/recommended"]
}
```

## Rule `no-literal-string`

This rule aims to avoid developers to display literal string directly to users without translating them.

> <span style="color: lightcoral">Note:</span> Disable auto-fix because key in the call `i18next.t(key)` usually was not the same as the literal

Example of incorrect code:

```js
/*eslint i18next/no-literal-string: "error"*/
<div>hello world</div>
```

Example of correct code:

```js
/*eslint i18next/no-literal-string: "error"*/
<div>{i18next.t('HELLO_KEY')}</div>
```

More options can be found [here](./docs/rules/no-literal-string.md)

### Breaking change

By default, it will only validate the plain text in JSX markup instead of all literal strings in previous versions.
[You can change it easily](./docs/rules/no-literal-string.md)

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