# grouped-accessor-pairs

Require getter and setter pairs to be adjacent

A separated getter and setter split one property's readable and writable behavior across a declaration.
Instead, you SHOULD keep each getter adjacent to its corresponding setter.

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

## Reported

```ds title="main.ds"
interface Store {
    get value(): string;
    clear(): void;
    set value(next: string);
}
```

## Accepted

```ds title="main.ds"
interface Store {
    get value(): string;
    set value(next: string);
    clear(): void;
}
```

## Prior art

- [ESLint · grouped-accessor-pairs](https://eslint.org/docs/latest/rules/grouped-accessor-pairs)

[language/linter/src/rules/style/grouped_accessor_pairs.rs:8](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/style/grouped_accessor_pairs.rs#L8)
