Skip to content

feat: remove deprecated RuleContext types #11386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions packages/utils/src/ts-eslint/Rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { ParserServices, TSESTree } from '../ts-estree';
import type { AST } from './AST';
import type { FlatConfig } from './Config';
import type { Linter } from './Linter';
import type { Scope } from './Scope';
import type { SourceCode } from './SourceCode';

export type RuleRecommendation = 'recommended' | 'strict' | 'stylistic';
Expand Down Expand Up @@ -295,23 +294,6 @@ export interface RuleContext<

// Deprecated members

/**
* Returns an array of the ancestors of the currently-traversed node, starting at
* the root of the AST and continuing through the direct parent of the current node.
* This array does not include the currently-traversed node itself.
*
* @deprecated in favor of `SourceCode#getAncestors`
*/
getAncestors(): TSESTree.Node[];

/**
* Returns a list of variables declared by the given node.
* This information can be used to track references to variables.
*
* @deprecated in favor of `SourceCode#getDeclaredVariables`
*/
getDeclaredVariables(node: TSESTree.Node): readonly Scope.Variable[];

/**
* Returns the current working directory passed to Linter.
* It is a path to a directory that should be considered as the current working directory.
Expand Down Expand Up @@ -348,14 +330,6 @@ export interface RuleContext<
*/
physicalFilename: string;

/**
* Returns the scope of the currently-traversed node.
* This information can be used track references to variables.
*
* @deprecated in favor of `SourceCode#getScope`
*/
getScope(): Scope.Scope;

/**
* Returns a SourceCode object that you can use to work with the source that
* was passed to ESLint.
Expand All @@ -370,14 +344,6 @@ export interface RuleContext<
*/
sourceCode: Readonly<SourceCode>;

/**
* Marks a variable with the given name in the current scope as used.
* This affects the no-unused-vars rule.
*
* @deprecated in favor of `SourceCode#markVariableAsUsed`
*/
markVariableAsUsed(name: string): boolean;

/**
* Reports a problem in the code.
*/
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy