> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# no-useless-empty-export

[Added in v0.1.4](https://github.com/web-infra-dev/rslint/releases/tag/v0.1.4)
## Configuration


```ts title=rslint.config.ts
import { defineConfig, ts } from '@rslint/core';

export default defineConfig([
  ts.configs.recommended,
  {
    rules: {
      '@typescript-eslint/no-useless-empty-export': 'error',
    },
  },
]);
```

## Rule Details

Disallow empty exports (`export {}`) that don't affect the module's exports. An empty `export {}` is used to turn a script file into a module, but if the file already has other imports or exports, this empty export is unnecessary and can be removed.

This rule does not flag empty exports in `.d.ts` definition files, where they may be needed for module encapsulation.

Examples of **incorrect** code for this rule:

```typescript
export const value = 'Hello';
export {};

import { foo } from 'bar';
export {};
```

Examples of **correct** code for this rule:

```typescript
export const value = 'Hello';

export {};
// (when no other imports/exports exist, this is the only module indicator)
```

## Original Documentation

- [typescript-eslint: no-useless-empty-export](https://typescript-eslint.io/rules/no-useless-empty-export)
- [Source code](https://github.com/typescript-eslint/typescript-eslint/blob/v8.67.0/packages/eslint-plugin/src/rules/no-useless-empty-export.ts)
