# no-mutable-exports

Rule `import/no-mutable-exports`. Forbid the use of mutable exports with `var` or `let`.

- Source: import
- Technologies: Imports
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 14.7M weekly downloads of presets that enable it
- Trend: +18.8% last quarter
- Rank: #677 by reach, #1387 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `import/no-mutable-exports` | no | no | package `eslint-plugin-import` | [docs](https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-mutable-exports.md) |
| Oxlint | `import/no-mutable-exports` | no | no | plugin `import`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/import/no-mutable-exports.html) |
| Biome | `nursery/noMutableExports` | no | no | group nursery, since 2.6.10 | [docs](https://biomejs.dev/linter/rules/no-mutable-exports/) |

## Code examples

### Incorrect: the rule reports this

```js
export let count = 2
export var count = 3

let count = 4
export { count } // reported here
```

### Correct: the rule accepts this

```js
export const count = 1
export function getCount() {}
export class Counter {}
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import importPlugin from "eslint-plugin-import";

export default [
  {
    plugins: { import: importPlugin },
    rules: {
      "import/no-mutable-exports": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "import"
  ],
  "rules": {
    "import/no-mutable-exports": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noMutableExports": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb base](https://lintradar.dev/presets/airbnb-base.md) | ESLint | `eslint-config-airbnb-base` | 241 | 6.5M | +2.1% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [Nuxt](https://lintradar.dev/presets/nuxt.md) | ESLint | `@nuxt/eslint-config` | 188 | 1.5M | +72.8% |
| [Anthony Fu's config](https://lintradar.dev/presets/antfu.md) | ESLint | `@antfu/eslint-config` | 294 | 758.7K | +49.9% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |

## Related rules

- [import/no-absolute-path](https://lintradar.dev/rules/import/no-absolute-path.md): Forbid import of modules using absolute paths.
- [import/no-extraneous-dependencies](https://lintradar.dev/rules/import/no-extraneous-dependencies.md): Forbid the use of extraneous packages.
- [import/no-amd](https://lintradar.dev/rules/import/no-amd.md): Forbid AMD `require` and `define` calls.
- [import/newline-after-import](https://lintradar.dev/rules/import/newline-after-import.md): Enforce a newline after import statements.
- [import/no-named-default](https://lintradar.dev/rules/import/no-named-default.md): Forbid named default exports.
- [import/no-webpack-loader-syntax](https://lintradar.dev/rules/import/no-webpack-loader-syntax.md): Forbid webpack loader syntax in imports.

---

Web page: https://lintradar.dev/rules/import/no-mutable-exports. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
