# no-empty-function

Rule `typescript/no-empty-function`. Disallow empty functions

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

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/no-empty-function` | no | suggestion | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/no-empty-function) |
| Biome | `suspicious/noEmptyBlockStatements` | no | no | group suspicious, since 1.3.0 | [docs](https://biomejs.dev/linter/rules/no-empty-block-statements/) |

## Code examples

### Correct: the rule accepts this

```ts
class Foo {
  private constructor() {}
}
```

```ts
class Foo {
  protected constructor() {}
}
```

```ts
class Foo {
  @decorator()
  foo() {}
}
```

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

### Biome: `biome.json`

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

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [typescript-eslint stylistic](https://lintradar.dev/presets/typescript-eslint-stylistic.md) | ESLint | `@typescript-eslint/eslint-plugin` | 17 | 175.9M | +29.5% |
| [Airbnb TypeScript](https://lintradar.dev/presets/airbnb-typescript.md) | ESLint | `eslint-config-airbnb-typescript` | 19 | 1.8M | +1.2% |
| [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

- [eslint/no-empty-function](https://lintradar.dev/rules/eslint/no-empty-function.md): Disallow empty functions
- [typescript/use-unknown-in-catch-callback-variable](https://lintradar.dev/rules/typescript/use-unknown-in-catch-callback-variable.md): Enforce typing arguments in Promise rejection callbacks as `unknown`
- [typescript/related-getter-setter-pairs](https://lintradar.dev/rules/typescript/related-getter-setter-pairs.md): Enforce that `get()` types should be assignable to their equivalent `set()` type
- [typescript/no-unsafe-argument](https://lintradar.dev/rules/typescript/no-unsafe-argument.md): Disallow calling a function with a value with type `any`
- [typescript/prefer-return-this-type](https://lintradar.dev/rules/typescript/prefer-return-this-type.md): Enforce that `this` is used when only `this` type is returned
- [typescript/no-unsafe-call](https://lintradar.dev/rules/typescript/no-unsafe-call.md): Disallow calling a value with type `any`

---

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