Skip to content

Commit 1bef636

Browse files
authored
fix(no-undefined-types): avoid eslint 8 error; fixes #1387 (#1388)
1 parent 0a30832 commit 1bef636

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/rules/noUndefinedTypes.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,12 @@ export default iterateJsdoc(({
261261
.concat(importTags)
262262
.concat(definedTypes)
263263
.concat(/** @type {string[]} */ (definedPreferredTypes))
264-
.concat(...getValidRuntimeIdentifiers(node && sourceCode.getScope(node)))
264+
.concat(...getValidRuntimeIdentifiers(node && (
265+
(sourceCode.getScope &&
266+
/* c8 ignore next 2 */
267+
sourceCode.getScope(node)) ||
268+
context.getScope()
269+
)))
265270
.concat(
266271
settings.mode === 'jsdoc' ?
267272
[] :

0 commit comments

Comments
 (0)