> ## 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-function

> A private function declaration has no references.

## What it flags

The rule finds named function declarations in module scope or directly inside a function body when their name appears only at the declaration. Exports, script globals, overloads, recursive functions, functions referenced by JSX or JSDoc, and ambiguous same-name references are left alone. A name starting with an underscore marks an intentionally retained declaration.

The fix removes standalone declarations and retains a separator where needed to preserve automatic semicolon insertion and directive behavior. The fix leaves declarations with attached comments for manual editing. Removing a function that contains `import.meta` requires a manual edit when the file lacks a bare side-effect import or an explicit `export {}` marker. An edit requires review if the function contains JSX or may be keeping a TypeScript import from being elided.

## Configuration

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

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


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