Skip to content

Commit 40a6c1f

Browse files
committed
refactor: cleanup getCwd
1 parent d1e2435 commit 40a6c1f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/rules/no-restricted-call-after-await.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ module.exports = {
116116
}
117117

118118
function getCwd() {
119-
if (context.getCwd) {
120-
return context.getCwd()
119+
if (context.cwd) {
120+
return context.cwd
121121
}
122122
return path.resolve('')
123123
}

typings/eslint/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export namespace Rule {
350350
markVariableAsUsed?(name: string): boolean
351351
report(descriptor: ReportDescriptor): void
352352

353-
// eslint@6 does not have this method.
353+
/** @deprecated removed in ESLint v10 */
354354
getCwd?: () => string
355355
/** @since ESLint v8.40.0 */
356356
cwd: string

0 commit comments

Comments
 (0)