> 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-function

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

| Preset                            | Configured Value |
| --------------------------------- | ---------------- |
| ✅ ts.configs.stylistic            | `"error"`        |
| ✅ ts.configs.stylisticTypeChecked | `"error"`        |


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

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

## Rule Details

Disallows empty functions. Empty functions can reduce readability because readers need to guess whether the empty body is intentional. This rule extends the base ESLint `no-empty-function` rule with TypeScript-specific support, including constructors with parameter properties, decorated functions, override methods, and various function types like async functions and generators.

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

```typescript
function foo() {}

const bar = () => {};

class MyClass {
  method() {}
  constructor() {}
}
```

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

```typescript
function foo() {
  // intentionally empty
}

const bar = () => {
  return;
};

class MyClass {
  constructor(private name: string) {}
}
```

## Original Documentation

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