> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# unused-local-variable

> A local variable is assigned but never read.

## What it flags

A `const`, `let` or `var` is declared and never read. Names starting with `_`, destructuring (rest siblings omit keys on purpose), loop and catch variables, exports and files using `eval` or `with` are skipped, as is the whole rule when `noUnusedLocals` is on, a variable under an eslint-disable comment for `no-unused-vars` or `@typescript-eslint/no-unused-vars`, and codemod `*.input` / `*.output` fixtures, fixture folders, docs, examples, vendored code and assets. The fix deletes the declaration only when its initializer has no side effects, and is marked for review when the declaration has a type annotation and a non-literal initializer, since the annotation can be a compile-time assignability check.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "unused-local-variable": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.