diff --git a/packages/eslint-plugin/src/rules/no-unsafe-call.ts b/packages/eslint-plugin/src/rules/no-unsafe-call.ts index ebf250b8cc7d..8ad9651ef383 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-call.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-call.ts @@ -1,7 +1,4 @@ -import { - TSESTree, - AST_NODE_TYPES, -} from '@typescript-eslint/experimental-utils'; +import { TSESTree } from '@typescript-eslint/experimental-utils'; import * as util from '../util'; type MessageIds = 'unsafeCall' | 'unsafeNew'; diff --git a/packages/eslint-plugin/src/util/types.ts b/packages/eslint-plugin/src/util/types.ts index 993f8c270057..3d82dc37ca87 100644 --- a/packages/eslint-plugin/src/util/types.ts +++ b/packages/eslint-plugin/src/util/types.ts @@ -473,26 +473,3 @@ export function getContextualType( return checker.getContextualType(node); } - -export const enum AnyType { - Any, - AnyArray, - Safe, -} -/** - * @returns `AnyType.Any` if the type is `any`, `AnyType.AnyArray` if the type is `any[]` or `readonly any[]`, - * otherwise it returns `AnyType.Safe`. - */ -export function isAnyOrAnyArrayTypeDiscriminated( - node: ts.Node, - checker: ts.TypeChecker, -): AnyType { - const type = checker.getTypeAtLocation(node); - if (isTypeAnyType(type)) { - return AnyType.Any; - } - if (isTypeAnyArrayType(type, checker)) { - return AnyType.AnyArray; - } - return AnyType.Safe; -}