Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Enforce array type styles in TypeScript #5765

Merged
merged 1 commit into from Apr 28, 2020

Commits on Apr 28, 2020

  1. chore: Enforce array type styles in TypeScript

    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
    jackfranklin committed Apr 28, 2020
    Copy the full SHA
    c18b4e0 View commit details
    Browse the repository at this point in the history