enforce line breaks after opening and before closing array brackets (array-bracket-newline)

The --fix option on the command line can automatically fix some of the problems reported by this rule.

A number of style guides require or disallow line breaks inside of array brackets.

Rule Details

This rule enforces line breaks after opening and before closing array brackets.

Options

This rule has either a string option:

"always" requires line breaks inside braces

"never" disallows line breaks inside braces

Or an object option (Requires line breaks if any of properties is satisfied. Otherwise, disallows line breaks):

"multiline": true (default) requires line breaks if there are line breaks inside elements or between elements. If this is false, this condition is disabled.

"minItems": null (default) requires line breaks if the number of elements is at least the given integer. If this is 0, this condition will act the same as the option "always". If this is null (the default), this condition is disabled.