diff --git a/packages/utils/src/eslint-utils/context.ts b/packages/utils/src/eslint-utils/context.ts deleted file mode 100644 index 1229d72dbaf..00000000000 --- a/packages/utils/src/eslint-utils/context.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Wrappers around ESLint's deprecation of existing methods -/* eslint-disable deprecation/deprecation -- TODO - delete in the next major (v8) */ -import type { Scope, SourceCode } from '../ts-eslint'; -import type { RuleContext } from '../ts-eslint/Rule'; -import type { TSESTree } from '../ts-estree'; - -/** @deprecated use `context.sourceCode.getAncestors(node)` */ -export function getAncestors( - context: Readonly>, -): TSESTree.Node[] { - return context.getAncestors(); -} - -/** @deprecated use `context.sourceCode.getCwd()` */ -export function getCwd( - context: Readonly>, -): string { - return context.getCwd(); -} - -/** @deprecated use `context.sourceCode.getDeclaredVariables(node)` */ -export function getDeclaredVariables( - context: Readonly>, - node: TSESTree.Node, -): readonly Scope.Variable[] { - return context.sourceCode.getDeclaredVariables(node); -} - -/** @deprecated use `context.filename` */ -export function getFilename( - context: Readonly>, -): string { - return context.filename; -} - -/** @deprecated use `context.sourceCode.getScope(node) */ -export function getScope( - context: Readonly>, -): Scope.Scope { - return context.getScope(); -} - -/** @deprecated use `context.sourceCode` */ -export function getSourceCode( - context: Readonly>, -): Readonly { - return context.sourceCode; -} diff --git a/packages/utils/src/eslint-utils/index.ts b/packages/utils/src/eslint-utils/index.ts index 29062e4e708..baf3e82bc65 100644 --- a/packages/utils/src/eslint-utils/index.ts +++ b/packages/utils/src/eslint-utils/index.ts @@ -1,5 +1,4 @@ export * from './applyDefault'; -export * from './context'; export * from './getParserServices'; export * from './InferTypesFromRule'; export * from './RuleCreator';