# @lifeomic/eslint-plugin-i18next

> An ESLint plugin for validating i18next usage

Latest version **2.0.1** (published 2022-01-18) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2022-01-18 |
| First published | 2021-10-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | LifeOmic |
| Maintainers | lifeomicdev, npm-lifeomicdev-github |

## Links

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

## Recent versions

- 2.0.1 (latest) — 2022-01-18
- 2.0.0 — 2021-12-16
- 1.0.3 — 2021-10-20
- 1.0.2 — 2021-10-20
- 1.0.1 — 2021-10-20
- 1.0.0 — 2021-10-20

## README

This repository contains an ESLint plugin for validating usage of [`i18next`](https://github.com/i18next/i18next).

## Installation

```
yarn add -D @lifeomic/eslint-plugin-i18next
```

## Usage

```javascript
// .eslintrc.js
module.exports = {
  plugins: ['@lifeomic/i18next'],
  rules: {
    '@lifeomic/i18next/default-value': [
      'error',
      {
        /* optional options object */
      },
    ],
  },
};
```

## Rule Options

#### `default-value`

- `translateFunctionNames`: an array of translation function names to validate. Default is `['t']`
- `allowKeyOnly`: whether to allow e.g. `t('just-the-key')`. Default is `false`.
- `allowNestingInterpolation`: Whether to allow e.g. `{ defaultValue: 'some string $t(interpolated)' }`. Default is `false`.
- `nestingPrefix`: Used when `allowNestingInterpolation` is `false` to identify interpolated variables. Default is `"$t("`.

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