Skip to main content

no-code-block-newlines

Disallows leading and trailing blank lines inside fenced code blocks.

Rule Details

This rule automatically removes blank lines immediately after an opening fence or immediately before a closing fence.

<!-- Bad -->

```txt

hello

```

<!-- Good -->

```txt
hello
```

Options

This rule is not configurable.

Resources