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

format/operators/binary-spacing

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

What it does

Binary operators should be surrounded by space as configured.

Configuration

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

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

Options

Name Type Allowed values Default Upstream name
default enum align, align-by-scope, align-single-space, align-single-space-minimal, align-single-space-by-scope, align-single-space-minimal-by-scope, single-space, no-space, at-least-single-space "single-space" default
operators map align, align-by-scope, align-single-space, align-single-space-minimal, align-single-space-by-scope, align-single-space-minimal-by-scope, single-space, no-space, at-least-single-space { } operators

Replaces

More format/operators rules · Edit this page

Last updated on

Was this page helpful?