> 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-meaningless-void-operator

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

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


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

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

## Rule Details

Disallows the `void` operator when its argument is already of type `void` or `undefined`. The `void` operator is intended to convey that a return value is deliberately being ignored. Using it on an expression that already evaluates to `void` or `undefined` is redundant and misleading. Optionally, the rule can also check for `void` on `never`-typed expressions.

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

```typescript
void undefined;

void console.log('hello');

function foo(): void {}
void foo();
```

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

```typescript
void Promise.resolve();

void someAsyncFunction();

console.log('hello');

foo();
```

## Original Documentation

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