Rule: array-type

Requires using either ‘T[]’ or ‘Array' for arrays.

Notes:
TS Only Has Fixer

Config

One of the following arguments must be provided:

  • "array" enforces use of T[] for all types T.
  • "generic" enforces use of Array<T> for all types T.
  • "array-simple" enforces use of T[] if T is a simple type (primitive or type reference).
Config examples
"array-type": [true, "array"]
"array-type": [true, "generic"]
"array-type": [true, "array-simple"]
Schema
{
  "type": "string",
  "enum": [
    "array",
    "generic",
    "array-simple"
  ]
}