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

format/arrays/no-trailing-comma-single-line

In the format-laravel preset. Safe fix.

What it does

If a list of values separated by a comma is contained on a single line, then the last item MUST NOT have a trailing comma.

Configuration

[format.rules]
"arrays/no-trailing-comma-single-line" = true

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

Options

Name Type Allowed values Default Upstream name
elements list arguments, array, array-destructuring, group-import ["arguments", "array", "array-destructuring", "group-import"] elements

Replaces

More format/arrays rules · Edit this page

Last updated on

Was this page helpful?