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

lint/operators/prefer-coalesce

In the modernize set. Safe fix.

What it does

Use null coalescing operator ?? where possible.

Configuration

[lint.rules]
"operators/prefer-coalesce" = "error"

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

Replaces

More lint/operators rules · Edit this page

Last updated on

Was this page helpful?