# padding-around-after-each-blocks

Rule `jest/padding-around-after-each-blocks`. Enforce padding around `afterEach` blocks

- Source: jest
- Technologies: Testing
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1746 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `jest/padding-around-after-each-blocks` | no | safe | package `eslint-plugin-jest` | [docs](https://github.com/jest-community/eslint-plugin-jest/blob/v29.17.2/docs/rules/padding-around-after-each-blocks.md) |
| Oxlint | `jest/padding-around-after-each-blocks` | no | safe | plugin `jest`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/jest/padding-around-after-each-blocks.html) |

## Code examples

### Incorrect: the rule reports this

```js
const something = 123;
afterEach(() => {
  // more stuff
});
describe('foo', () => {});
```

### Correct: the rule accepts this

```js
const something = 123;

afterEach(() => {
  // more stuff
});

describe('foo', () => {});
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import jest from "eslint-plugin-jest";

export default [
  {
    plugins: { jest },
    rules: {
      "jest/padding-around-after-each-blocks": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "jest"
  ],
  "rules": {
    "jest/padding-around-after-each-blocks": "error"
  }
}
```

## Related rules

- [vitest/padding-around-after-each-blocks](https://lintradar.dev/rules/vitest/padding-around-after-each-blocks.md): Enforce padding around `afterEach` blocks
- [jest/padding-around-after-all-blocks](https://lintradar.dev/rules/jest/padding-around-after-all-blocks.md): Enforce padding around `afterAll` blocks
- [jest/padding-around-all](https://lintradar.dev/rules/jest/padding-around-all.md): Enforce padding around Jest functions
- [jest/no-untyped-mock-factory](https://lintradar.dev/rules/jest/no-untyped-mock-factory.md): Disallow using `jest.mock()` factories without an explicit type parameter
- [jest/padding-around-before-all-blocks](https://lintradar.dev/rules/jest/padding-around-before-all-blocks.md): Enforce padding around `beforeAll` blocks
- [jest/no-unneeded-async-expect-function](https://lintradar.dev/rules/jest/no-unneeded-async-expect-function.md): Disallow unnecessary async function wrapper for expected promises

---

Web page: https://lintradar.dev/rules/jest/padding-around-after-each-blocks. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
