eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

typescript/prefer-array-type-alias

ESLint plugin / typescript/prefer-array-type-alias

Prefer alias for array type.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/typescript/prefer-array-type-alias": "error"
  }
};

Examples of incorrect code

function f(x: readonly string[]) {}

Examples of correct code

type strings = readonly string[];
function f(x: strings) {}