目录

@hw-stylistic/array-bracket-spacing

Enforce no spaces inside array brackets. This rule only checks .ets files.

Rule Configuration

// code-linter.json5
{
  "rules": {
    "@hw-stylistic/array-bracket-spacing": "error"
  }
}

Options

This rule is not configurable.

Example of Correct Code

export const arr = ['a', 'b'];

Example of Incorrect Code

// There should be no space after '['.
// There should be no space before ']'.
export const arr = [ 'a', 'b' ];

Rule Set

"plugin:@hw-stylistic/recommended"
"plugin:@hw-stylistic/all"

For details about how to configure Code Linter check rules, see Code Linter.