From 09caa0dcba54156523309186a5e08e57d30e154d Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Mar 2020 20:36:44 +0400 Subject: Updated TypeScript to v2.25.0 Signed-off-by: Valentin Popov --- src/rules/typescript/default.json | 54 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'src/rules/typescript/default.json') diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json index 43ad740..a580318 100644 --- a/src/rules/typescript/default.json +++ b/src/rules/typescript/default.json @@ -2,6 +2,10 @@ "@typescript-eslint/await-thenable": [ "error" ], + "@typescript-eslint/class-literal-property-style": [ + "error", + "getters" + ], "@typescript-eslint/comma-spacing": [ "error", { @@ -64,6 +68,9 @@ "prefixWithI": "always" } ], + "@typescript-eslint/no-base-to-string": [ + "error" + ], "@typescript-eslint/no-empty-interface": [ "warn", { @@ -115,6 +122,26 @@ "allowTupleTypes": "in-unions-and-intersections" } ], + "@typescript-eslint/no-unnecessary-condition": [ + "error", + { + "allowConstantLoopConditions": false, + "checkArrayPredicates": true, + "ignoreRhs": true + } + ], + "@typescript-eslint/no-unnecessary-type-assertion": [ + "error" + ], + "@typescript-eslint/no-unsafe-call": [ + "error" + ], + "@typescript-eslint/no-unsafe-member-access": [ + "error" + ], + "@typescript-eslint/no-unsafe-return": [ + "error" + ], "@typescript-eslint/no-untyped-public-signature": [ "warn", { @@ -151,6 +178,12 @@ "@typescript-eslint/no-var-requires": [ "error" ], + "@typescript-eslint/prefer-readonly-parameter-types": [ + "error", + { + "checkParameterProperties": true + } + ], "@typescript-eslint/quotes": [ "error", "double", @@ -188,6 +221,8 @@ "@typescript-eslint/type-annotation-spacing": [ "error", { + "after": true, + "before": true, "overrides": { "arrow": { "after": true, @@ -196,6 +231,22 @@ "colon": { "after": true, "before": false + }, + "parameter": { + "after": true, + "before": true + }, + "property": { + "after": true, + "before": true + }, + "returnType": { + "after": true, + "before": true + }, + "variable": { + "after": true, + "before": true } } } @@ -209,7 +260,8 @@ "objectDestructuring": true, "parameter": true, "propertyDeclaration": true, - "variableDeclaration": true + "variableDeclaration": true, + "variableDeclarationIgnoreFunction": false } ], "comma-spacing": [ -- cgit v1.2.3 From 5d9c8c8b4e0874b0acb3a63159040e994b511887 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Mar 2020 20:43:49 +0400 Subject: fix(typescript): no-explicit-any Signed-off-by: Valentin Popov --- src/rules/typescript/default.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rules/typescript/default.json') diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json index a580318..fe556bc 100644 --- a/src/rules/typescript/default.json +++ b/src/rules/typescript/default.json @@ -80,7 +80,7 @@ "@typescript-eslint/no-explicit-any": [ "warn", { - "fixToUnknown": false, + "fixToUnknown": true, "ignoreRestArgs": false } ], -- cgit v1.2.3