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

format/operators/new-parentheses

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

What it does

All instances created with new keyword must (not) be followed by parentheses.

Configuration

[format.rules]
"operators/new-parentheses" = true

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

Options

Name Type Allowed values Default Upstream name
anonymous-class bool Any true anonymous_class
named-class bool Any true named_class

Replaces

More format/operators rules · Edit this page

Last updated on

Was this page helpful?