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

lint/functions/require-array-filter-callback

In the lint-essential preset and every stricter one. Report only. Intent: suspicious. Upstream setting: strictRules.strictArrayFilter.

What it does

Requires a callback for array_filter(): without one it drops every falsy value, not only null.

Configuration

[lint.rules]
"functions/require-array-filter-callback" = "error"

To skip it in some files or lines, add an override or an ignore comment.

Replaces

More lint/functions rules · Edit this page

Last updated on

Was this page helpful?