From 447832c9bc94d88f3e11812e0846b8f5f1098000 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Fri, 23 Apr 2021 10:19:45 +1000 Subject: [PATCH] Include getCwd() in RuleContext --- packages/experimental-utils/src/ts-eslint/Rule.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index d74af833121e..e342d8e57af4 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -211,6 +211,12 @@ interface RuleContext< */ getDeclaredVariables(node: TSESTree.Node): Scope.Variable[]; + /** + * returns the cwd passed to Linter. + * It is a path to a directory that should be considered as the current working directory. + */ + getCwd(): string; + /** * Returns the filename associated with the source. */