> 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-empty-interface

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


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

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

## Rule Details

Disallows empty interface declarations. An empty interface with no members is equivalent to the empty object type `{}`. An empty interface that extends a single interface is equivalent to a type alias of that interface. In both cases, the interface declaration adds unnecessary indirection and can be replaced with a simpler construct.

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

```typescript
// Empty interface is equivalent to {}
interface Foo {}

// Equivalent to: type Bar = Baz
interface Bar extends Baz {}
```

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

```typescript
// Interface with members
interface Foo {
  name: string;
}

// Interface extending multiple interfaces
interface Bar extends Baz, Qux {}

// Type alias instead of empty extending interface
type Bar = Baz;
```

## Original Documentation

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