# no-empty-object-type

Rule `typescript/no-empty-object-type`. Disallow accidentally using the "empty object" type

- Source: typescript
- Technologies: TypeScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 180.8M weekly downloads of presets that enable it
- Trend: +30.5% last quarter
- Rank: #88 by reach, #1121 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/no-empty-object-type` | yes | suggestion | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/no-empty-object-type) |
| Oxlint | `typescript/no-empty-object-type` | no | suggestion | plugin `typescript`, category restriction | [docs](https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-empty-object-type.html) |
| Biome | `complexity/noBannedTypes` | yes | safe | group complexity, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/no-banned-types/) |

## Code examples

### Incorrect: the rule reports this

```ts
let anyObject: {};
let anyValue: {};

interface AnyObjectA {}
interface AnyValueA {}

type AnyObjectB = {};
type AnyValueB = {};
```

### Correct: the rule accepts this

```ts
let anyObject: object;
let anyValue: unknown;

type AnyObjectA = object;
type AnyValueA = unknown;

type AnyObjectB = object;
type AnyValueB = unknown;

let objectWith: { property: boolean };

interface InterfaceWith {
  property: boolean;
}

type TypeWith = { property: boolean };
```

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-object-type": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

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

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "complexity": {
        "noBannedTypes": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [typescript-eslint recommended](https://lintradar.dev/presets/typescript-eslint-recommended.md) | ESLint | `@typescript-eslint/eslint-plugin` | 24 | 175.9M | +29.5% |
| [typescript-eslint strict](https://lintradar.dev/presets/typescript-eslint-strict.md) | ESLint | `@typescript-eslint/eslint-plugin` | 32 | 175.9M | +29.5% |
| [typescript-eslint strict type-checked](https://lintradar.dev/presets/typescript-eslint-strict-type-checked.md) | ESLint | `@typescript-eslint/eslint-plugin` | 75 | 175.9M | +29.5% |
| [typescript-eslint recommended type-checked](https://lintradar.dev/presets/typescript-eslint-recommended-type-checked.md) | ESLint | `@typescript-eslint/eslint-plugin` | 47 | 175.9M | +29.5% |
| [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% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [typescript/no-unsafe-function-type](https://lintradar.dev/rules/typescript/no-unsafe-function-type.md): Disallow using the unsafe built-in Function type
- [typescript/no-namespace](https://lintradar.dev/rules/typescript/no-namespace.md): Disallow TypeScript namespaces
- [typescript/no-require-imports](https://lintradar.dev/rules/typescript/no-require-imports.md): Disallow invocation of `require()`
- [typescript/no-unused-expressions](https://lintradar.dev/rules/typescript/no-unused-expressions.md): Disallow unused expressions
- [typescript/no-array-constructor](https://lintradar.dev/rules/typescript/no-array-constructor.md): Disallow generic `Array` constructors
- [typescript/no-unused-vars](https://lintradar.dev/rules/typescript/no-unused-vars.md): Disallow unused variables

---

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