Skip to content

Commit cfcd1e3

Browse files
committed
Remove check for context.cwd
1 parent 7c9ab9c commit cfcd1e3

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,6 @@ module.exports = {
115115
return allLocalImports
116116
}
117117

118-
function getCwd() {
119-
if (context.cwd) {
120-
return context.cwd
121-
}
122-
return path.resolve('')
123-
}
124-
125118
/**
126119
* @param {string} moduleName
127120
* @param {Program} ast
@@ -131,7 +124,7 @@ module.exports = {
131124
/** @type {string} */
132125
let modulePath
133126
if (moduleName.startsWith('.')) {
134-
modulePath = safeRequireResolve(path.join(getCwd(), moduleName))
127+
modulePath = safeRequireResolve(path.join(context.cwd, moduleName))
135128
} else if (path.isAbsolute(moduleName)) {
136129
modulePath = safeRequireResolve(moduleName)
137130
} else {

0 commit comments

Comments
 (0)