Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js')
-rw-r--r--tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js
index 8d575c27dae..05c07c34c97 100644
--- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js
+++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js
@@ -108,11 +108,15 @@ const getSymbol = function (node, globals, scope, opt) {
return null;
}
+ case 'ClassExpression':
+ {
+ return getSymbol(node.body, globals, scope, opts);
+ }
+
case 'TSTypeAliasDeclaration':
case 'TSEnumDeclaration':
case 'TSInterfaceDeclaration':
case 'ClassDeclaration':
- case 'ClassExpression':
case 'FunctionExpression':
case 'FunctionDeclaration':
case 'ArrowFunctionExpression':
@@ -141,7 +145,7 @@ const getSymbol = function (node, globals, scope, opt) {
}
val.type = 'object';
- val.value = node;
+ val.value = node.parent;
return val;
}
@@ -539,7 +543,11 @@ const findExportedNode = function (block, node, cache) {
};
const isNodeExported = function (node, globals, opt) {
- if (opt.initModuleExports && globals.props.module && globals.props.module.props.exports && findNode(node, globals.props.module.props.exports)) {
+ var _globals$props$module, _globals$props$module2;
+
+ const moduleExports = (_globals$props$module = globals.props.module) === null || _globals$props$module === void 0 ? void 0 : (_globals$props$module2 = _globals$props$module.props) === null || _globals$props$module2 === void 0 ? void 0 : _globals$props$module2.exports;
+
+ if (opt.initModuleExports && moduleExports && findNode(node, moduleExports)) {
return true;
}