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

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

| Preset                   | Configured Value |
| ------------------------ | ---------------- |
| ✅ js.configs.recommended | `"error"`        |


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

export default defineConfig([
  js.configs.recommended,
  {
    rules: {
      'no-empty-pattern': 'error',
    },
  },
]);
```

## Rule Details

Disallow empty destructuring patterns. Empty destructuring patterns do not create any variables and may be a sign of a mistake.

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

```javascript
var {} = foo;
var [] = foo;
var {
  a: {},
} = foo;
var {
  a: [],
} = foo;
function foo({}) {}
function foo([]) {}
```

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

```javascript
var { a } = foo;
var [a] = foo;
var { a = {} } = foo;
var {
  a: { b },
} = foo;
function foo({ a }) {}
function foo([a]) {}
```

## Options

- `allowObjectPatternsAsParameters`: If `true`, allows empty object patterns as function parameters. Default: `false`.

## Original Documentation

- [ESLint: no-empty-pattern](https://eslint.org/docs/latest/rules/no-empty-pattern)
- [Source code](https://github.com/eslint/eslint/blob/v10.8.1/lib/rules/no-empty-pattern.js)
