---
title: "unused-key"
description: "A key with no usage, after keysInUse, derived keys and dynamic prefixes."
canonical_url: "https://x18n.dev/checks/unused-key"
---
# unused-key

> A key with no usage, after keysInUse, derived keys and dynamic prefixes.

<!-- Generated by docs/scripts/generate.ts from the source code. Do not edit. -->

A key with no usage, after keysInUse, derived keys and dynamic prefixes.

The check is on by default, with the severity `warning`.

A key counts as used when:

- a usage names it,
- a prefix usage covers it,
- it matches `usage.keysInUse`,
- it is a derived key of a used key (`usage.derivedKeys`, for example i18next `{key}_*` plural keys),
- a linked message or nesting placeholder (`@:key`, `$t(key)`) names it.

The check runs only when the project has at least one scanner.

## Configure

Change the severity, or turn the check off, in `checks`:

```ts [x18n.config.ts]
import { defineConfig } from '@x18n/core'

export default defineConfig({
  checks: {
    'unused-key': 'off',
  },
})
```

`x18n check --only unused-key` runs this check alone. `x18n check --skip unused-key` skips it for one run.

## Source

- [`packages/builtins/src/checks/index.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/builtins/src/checks/index.ts)


## Sitemap

See the full [sitemap](https://x18n.dev/sitemap.md) for all pages.
