# no-empty-pattern

Disallow empty destructuring patterns

An empty destructuring pattern reads a value without selecting any of its fields or elements.
Instead, you SHOULD bind the intended values or remove the ineffective destructuring operation.

- Category: suspicious
- Level: warning
- Fix: none
- Scope: module

## Reported

```ds title="main.ds"
function read(value: { name: string }): void {
    const {} = value;
}
```

## Accepted

```ds title="main.ds"
function read(value: { name: string }): void {
    const { name } = value;
}
```

## Prior art

- [ESLint · no-empty-pattern](https://eslint.org/docs/latest/rules/no-empty-pattern)

[language/linter/src/rules/suspicious/no_empty_pattern.rs:6](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/suspicious/no_empty_pattern.rs#L6)
