From 010f934e2327094ea01ddd24e46f86c043c43153 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Wed, 22 Jan 2020 16:45:41 +0800 Subject: [PATCH] ESLint: enable 'no-unnecessary-type-arguments' check --- .eslintrc.yml | 2 +- src/utilities/getIntrospectionQuery.d.ts | 5 ++--- src/utilities/getIntrospectionQuery.js | 7 +++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 6ceebaa758..70ec0f57aa 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -481,7 +481,7 @@ overrides: '@typescript-eslint/no-type-alias': off # TODO consider '@typescript-eslint/no-unnecessary-condition': error '@typescript-eslint/no-unnecessary-qualifier': error - '@typescript-eslint/no-unnecessary-type-arguments': off # TODO error + '@typescript-eslint/no-unnecessary-type-arguments': error '@typescript-eslint/no-unnecessary-type-assertion': error '@typescript-eslint/no-unused-vars-experimental': off '@typescript-eslint/no-var-requires': error diff --git a/src/utilities/getIntrospectionQuery.d.ts b/src/utilities/getIntrospectionQuery.d.ts index 527d946d5d..c18cd7a571 100644 --- a/src/utilities/getIntrospectionQuery.d.ts +++ b/src/utilities/getIntrospectionQuery.d.ts @@ -112,11 +112,10 @@ export interface IntrospectionNonNullTypeRef< } export type IntrospectionTypeRef = - | IntrospectionNamedTypeRef + | IntrospectionNamedTypeRef | IntrospectionListTypeRef | IntrospectionNonNullTypeRef< - | IntrospectionNamedTypeRef - | IntrospectionListTypeRef + IntrospectionNamedTypeRef | IntrospectionListTypeRef >; export type IntrospectionOutputTypeRef = diff --git a/src/utilities/getIntrospectionQuery.js b/src/utilities/getIntrospectionQuery.js index 11ddede61a..e6d344086f 100644 --- a/src/utilities/getIntrospectionQuery.js +++ b/src/utilities/getIntrospectionQuery.js @@ -204,11 +204,10 @@ export type IntrospectionNonNullTypeRef< |}; export type IntrospectionTypeRef = - | IntrospectionNamedTypeRef - | IntrospectionListTypeRef + | IntrospectionNamedTypeRef<> + | IntrospectionListTypeRef<> | IntrospectionNonNullTypeRef< - | IntrospectionNamedTypeRef - | IntrospectionListTypeRef, + IntrospectionNamedTypeRef<> | IntrospectionListTypeRef<>, >; export type IntrospectionOutputTypeRef =