disallowSpacesInsideArrayBrackets

Disallows space after opening array square bracket and before closing. Reports only on arrays, not on property accessors. Use disallowSpacesInsideBrackets to report on all brackets.

Types: Boolean, String or Object

Values: "all" or true for strict mode, "nested" (deprecated use "allExcept": [ "[", "]" ]) ignores closing brackets in a row.

Example

"disallowSpacesInsideArrayBrackets": "all"

// or

"disallowSpacesInsideArrayBrackets": {
    "allExcept": [ "[", "]", "{", "}" ]
}
Valid for mode "all"
var x = [[1]];
var x = a[ 0 ]; // Property accessor not an array
Valid for mode "nested"
var x = [ [1] ];
Valid for mode "allExcept"
var x = [ [1] ];
var x = [ { a: 1 } ];
Invalid
var x = [ [ 1 ] ];
Rule source
Test source