Skip to content

no-code-block-newlines

Disallows leading and trailing blank lines inside fenced code blocks.

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

<!-- Bad -->
```txt
hello
```
<!-- Good -->
```txt
hello
```

This rule is not configurable.