From dfac7f513816657c89b512fead190607129695e9 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 19 Feb 2020 14:59:26 +0400 Subject: feat(typescript): no-type-alias Signed-off-by: Valentin Popov --- ROADMAP.md | 2 +- src/rules/typescript/default.json | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index 2d23211..b4a1796 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -429,7 +429,7 @@ - [ ] "no-require-imports" - [ ] "no-this-alias" - [ ] "no-throw-literal" -- [ ] "no-type-alias" +- [X] "no-type-alias" - [ ] "no-unnecessary-boolean-literal-compare" - [ ] "no-unnecessary-condition" - [ ] "no-unnecessary-qualifier" diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json index 0941e82..9c1081b 100644 --- a/src/rules/typescript/default.json +++ b/src/rules/typescript/default.json @@ -103,6 +103,18 @@ "allowDefinitionFiles": true } ], + "@typescript-eslint/no-type-alias": [ + "error", + { + "allowAliases": "in-unions-and-intersections", + "allowCallbacks": "always", + "allowConditionalTypes": "always", + "allowConstructors": "never", + "allowLiterals": "never", + "allowMappedTypes": "never", + "allowTupleTypes": "in-unions-and-intersections" + } + ], "@typescript-eslint/no-untyped-public-signature": [ "error", { -- cgit v1.2.3