chore: Enforce array type styles in TypeScript (#5765)

This change enforces how we type arrays, e.g. choosing between:

* `string[]`
* `Array<string>`

I've gone for the `array-simple` option [1] which enforces that:

* primitive types and type references use `X[]`
* complex types use `Array<X>`

For example, we'd type an array of strings as `string[]`, but an array
of a union type as `Array<SomeUnionType>`.

[1]: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/array-type.md
This commit is contained in:
Jack Franklin
2020-04-28 15:06:43 +01:00
committed by GitHub
parent 1ccfbcb684
commit d69fbb9974
2 changed files with 5 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ interface SerializedAXNode {
haspopup?: string;
invalid?: string;
orientation?: string;
children?: Array<SerializedAXNode>;
children?: SerializedAXNode[];
}
export class Accessibility {