persona-community-5/.pnpm-store/v3/files/03/7abcb68ce80e1325519ebcd6db44aaa0094443be237c3de3006fee7a52f7545b13a383654004ab6f4961ccfe4aea553f6b7a341dc249ae663433aa69cd0f94
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

57 lines
1.5 KiB
Plaintext

---
description: 'Require or disallow an empty line between class members.'
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
> 🛑 This file is source code, not the primary documentation location! 🛑
>
> See **https://typescript-eslint.io/rules/lines-between-class-members** for documentation.
This rule extends the base [`eslint/lines-between-class-members`](https://eslint.org/docs/rules/lines-between-class-members) rule.
It adds support for ignoring overload methods in a class.
## Options
In addition to the options supported by the `lines-between-class-members` rule in ESLint core, the rule adds the following options:
- Object option:
- `"exceptAfterOverload": true` (default) - Skip checking empty lines after overload class members
- `"exceptAfterOverload": false` - **do not** skip checking empty lines after overload class members
### `exceptAfterOverload: true`
Examples of **correct** code for the `{ "exceptAfterOverload": true }` option:
```ts option='"always", { "exceptAfterOverload": true }' showPlaygroundButton
class foo {
bar(a: string): void;
bar(a: string, b: string): void;
bar(a: string, b: string) {}
baz() {}
qux() {}
}
```
### `exceptAfterOverload: false`
Examples of **correct** code for the `{ "exceptAfterOverload": false }` option:
```ts option='"always", { "exceptAfterOverload": false }' showPlaygroundButton
class foo {
bar(a: string): void;
bar(a: string, b: string): void;
bar(a: string, b: string) {}
baz() {}
qux() {}
}
```