# no-empty-interface

Rule `typescript/no-empty-interface`. Disallow the declaration of empty interfaces

- Source: typescript
- Technologies: TypeScript
- Kind: suspicious
- Needs type information: no
- Autofix: yes, in at least one linter
- Deprecated: yes
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.2% last quarter
- Rank: #468 by reach, #254 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/no-empty-interface` | no | safe | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/no-empty-interface) |
| Oxlint | `typescript/no-empty-interface` | no | no | plugin `typescript`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-empty-interface.html) |
| Biome | `suspicious/noEmptyInterface` | yes | safe | group suspicious, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/no-empty-interface/) |

## Code examples

### Incorrect: the rule reports this

```ts
// an empty interface
interface Foo {}

// an interface with only one supertype (Bar === Foo)
interface Bar extends Foo {}

// an interface with an empty list of supertypes
interface Baz {}
```

### Correct: the rule accepts this

```ts
// an interface with any number of members
interface Foo {
  name: string;
}

// same as above
interface Bar {
  age: number;
}

// an interface with more than one supertype
// in this case the interface can be used as a replacement of an intersection type.
interface Baz extends Foo, Bar {}
```

Examples from the ESLint documentation.

## Enable it

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

```js
import tseslint from "typescript-eslint";

export default [
  {
    plugins: { "@typescript-eslint": tseslint.plugin },
    rules: {
      "@typescript-eslint/no-empty-interface": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "typescript/no-empty-interface": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noEmptyInterface": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [typescript/prefer-optional-chain](https://lintradar.dev/rules/typescript/prefer-optional-chain.md): Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects
- [typescript/switch-exhaustiveness-check](https://lintradar.dev/rules/typescript/switch-exhaustiveness-check.md): Require switch-case statements to be exhaustive
- [typescript/ban-types](https://lintradar.dev/rules/typescript/ban-types.md): This rule bans specific types and can suggest alternatives. Note that it does not ban the corresponding runtime objects from being used.
- [typescript/prefer-string-starts-ends-with](https://lintradar.dev/rules/typescript/prefer-string-starts-ends-with.md): Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings
- [typescript/consistent-type-exports](https://lintradar.dev/rules/typescript/consistent-type-exports.md): Enforce consistent usage of type exports
- [typescript/consistent-type-imports](https://lintradar.dev/rules/typescript/consistent-type-imports.md): Enforce consistent usage of type imports

---

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