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

# padding-around-all

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

| Preset                     | Configured Value |
| -------------------------- | ---------------- |
| ✅ rstestPlugin.configs.all | `"warn"`         |


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

export default defineConfig([
  rstestPlugin.configs.recommended,
  {
    rules: {
      'rstest/padding-around-all': 'error',
    },
  },
]);
```

## Rule Details

Require blank lines around Rstest lifecycle hooks, suites, tests, and assertion groups. This rule combines the behavior of the seven focused `padding-around-*` rules. Consecutive `expect` statements form one group and do not require blank lines between them.

The rule classifies an expression statement by its first identifier, so calls and modifier or parameterization chains beginning with `beforeAll`, `beforeEach`, `afterAll`, `afterEach`, `describe`, `test`, `it`, or `expect` are included regardless of where that name was declared. Renamed aliases and namespace calls such as `rstest.test` are not recognized. Type information is not required.

## Incorrect

```ts
const database = createDatabase();
beforeAll(() => database.connect());
test('loads a user', () => {
  const user = loadUser();
  expect(user.name).toBe('Ada');
});
```

## Correct

```ts
const database = createDatabase();

beforeAll(() => database.connect());

test('loads a user', () => {
  const user = loadUser();

  expect(user.name).toBe('Ada');
});
```

## Autofix

The rule inserts missing blank lines around matching statements and assertion groups.
