From a2b22f9a73db6c99f0aa03bc87b4dce1a9a45951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Stocki?= Date: Mon, 11 Sep 2017 15:19:43 +0200 Subject: [PATCH] Allow Array type for generic types. There are two interferring TSLint rules: - array-type (TSLint built-in) - prefer-array-literal (tslint-microsoft-contrib) For now: Valid types: - `string[]` - `SomeType[]` - `Array>` Invalid types: - `Array` - `Array` - `GenericType[]` --- tslint.json | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tslint.json b/tslint.json index c727461..ab17f4b 100644 --- a/tslint.json +++ b/tslint.json @@ -14,7 +14,10 @@ "variable-declaration", "member-variable-declaration" ], - "max-line-length": [true, 120], + "max-line-length": [ + true, + 120 + ], "member-ordering": [ true, { @@ -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": [] } \ No newline at end of file