From 2b75c11d69bee88ca0cb77d7efd32b8d0387e6b3 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Mon, 10 May 2021 03:21:35 +1000 Subject: [PATCH] feat(experimental-utils): Include `getCwd()` in `RuleContext` type (#3308) --- packages/experimental-utils/src/ts-eslint/Rule.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index d74af833121..19f457201ef 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -211,6 +211,14 @@ interface RuleContext< */ getDeclaredVariables(node: TSESTree.Node): 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. + * This was added in v6.6.0 + * @since 6.6.0 + */ + getCwd?(): string; + /** * Returns the filename associated with the source. */