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

format/operators/unary-spacing

In the format-laravel and format-psr12 presets. Safe fix.

What it does

Unary operators should be placed adjacent to their operands.

Configuration

[format.rules]
"operators/unary-spacing" = true

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

Options

Name Type Allowed values Default Upstream name
only-dec-inc bool Any false only_dec_inc

Replaces

More format/operators rules · Edit this page

Last updated on

Was this page helpful?