Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

format/statements/single-line-empty-body

In the format-laravel preset. Safe fix.

What it does

Empty body of class, interface, trait, enum or function must be abbreviated as {} and placed on the same line as the previous symbol, separated by a single space.

Configuration

[format.rules]
"statements/single-line-empty-body" = true

To skip it in some files, add a @pun-ignore-file comment.

Replaces

More format/statements rules · Edit this page

Last updated on

Was this page helpful?