Skip to content

Commit

Permalink
Allow Array type for generic types.
Browse files Browse the repository at this point in the history
There are two interferring TSLint rules:
 - array-type (TSLint built-in)
 - prefer-array-literal (tslint-microsoft-contrib)

For now:
Valid types:
 - `string[]`
 - `SomeType[]`
 - `Array<GenericType<string>>`

Invalid types:
 - `Array<string>`
 - `Array<SomeType>`
 - `GenericType<string>[]`
  • Loading branch information
michalstocki committed Sep 11, 2017
1 parent a2410bc commit a2b22f9
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"variable-declaration",
"member-variable-declaration"
],
"max-line-length": [true, 120],
"max-line-length": [
true,
120
],
"member-ordering": [
true,
{
Expand Down Expand Up @@ -58,9 +61,18 @@
"no-invalid-this": true,
"no-default-export": true,
"arrow-parens": true,
"interface-name": [true, "never-prefix"],
"interface-name": [
true,
"never-prefix"
],
"prefer-function-over-method": true,
"align": false
"align": false,
"prefer-array-literal": [
true,
{
"allow-type-parameters": true
}
]
},
"rulesDirectory": []
}

0 comments on commit a2b22f9

Please sign in to comment.