Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Mark RuleWalker and ProgramAwareRuleWalker as deprecated #4413

Merged
merged 4 commits into from
Feb 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions src/language/walker/programAwareRuleWalker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import * as ts from "typescript";
import { IOptions } from "../rule/rule";
import { RuleWalker } from "./ruleWalker";

// tslint:disable-next-line:deprecation
export class ProgramAwareRuleWalker extends RuleWalker {
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
private readonly typeChecker: ts.TypeChecker;

Expand Down
6 changes: 6 additions & 0 deletions src/language/walker/ruleWalker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ import { Fix, IOptions, Replacement, RuleFailure } from "../rule/rule";
import { SyntaxWalker } from "./syntaxWalker";
import { IWalker } from "./walker";

/**
* @deprecated
* RuleWalker-based rules are slow,
* so it's generally preferable to use applyWithFunction instead of applyWithWalker.
* @see https://github.com/palantir/tslint/issues/2522
*/
export class RuleWalker extends SyntaxWalker implements IWalker {
private readonly limit: number;
private readonly options?: any[];
Expand Down