eslint-plugin-jsdoc
Advanced tools
Comparing version 8.4.6 to 8.5.0
@@ -109,2 +109,3 @@ "use strict"; | ||
case 'ClassDeclaration': | ||
case 'ClassExpression': | ||
case 'FunctionExpression': | ||
@@ -277,2 +278,11 @@ case 'FunctionDeclaration': | ||
} | ||
case 'ExportNamedDeclaration': | ||
{ | ||
if (node.declaration) { | ||
initVariables(node.declaration, globals, opts); | ||
} | ||
break; | ||
} | ||
} | ||
@@ -282,3 +292,3 @@ }; // Populates variable maps using AST | ||
const mapVariables = function mapVariables(node, globals, opt) { | ||
const mapVariables = function mapVariables(node, globals, opt, isExport) { | ||
/* istanbul ignore next */ | ||
@@ -320,3 +330,7 @@ const opts = opt || {}; | ||
_createSymbol(declaration.id, globals, declaration.init, globals, isGlobal); | ||
const symbol = _createSymbol(declaration.id, globals, declaration.init, globals, isGlobal); | ||
if (symbol && isExport) { | ||
symbol.exported = true; | ||
} | ||
}); | ||
@@ -352,8 +366,12 @@ break; | ||
if (node.declaration) { | ||
const symbol = _createSymbol(node.declaration, globals, node.declaration); | ||
/* istanbul ignore next */ | ||
if (node.declaration.type === 'VariableDeclaration') { | ||
mapVariables(node.declaration, globals, opts, true); | ||
} else { | ||
const symbol = _createSymbol(node.declaration, globals, node.declaration); | ||
/* istanbul ignore next */ | ||
if (symbol) { | ||
symbol.exported = true; | ||
if (symbol) { | ||
symbol.exported = true; | ||
} | ||
} | ||
@@ -431,3 +449,3 @@ } | ||
const findExportedNode = function findExportedNode(block, node, cache) { | ||
if (block.ANONYMOUS_DEFAULT) { | ||
if (block.ANONYMOUS_DEFAULT === node) { | ||
return true; | ||
@@ -434,0 +452,0 @@ } |
@@ -59,2 +59,6 @@ "use strict"; | ||
}, | ||
ClassExpression: { | ||
default: false, | ||
type: 'boolean' | ||
}, | ||
FunctionDeclaration: { | ||
@@ -196,2 +200,10 @@ default: true, | ||
ClassExpression(node) { | ||
if (!requireOption.ClassExpression) { | ||
return; | ||
} | ||
checkJsDoc(node); | ||
}, | ||
FunctionDeclaration(node) { | ||
@@ -198,0 +210,0 @@ if (!requireOption.FunctionDeclaration) { |
@@ -88,3 +88,3 @@ { | ||
}, | ||
"version": "8.4.6" | ||
"version": "8.5.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
459839
3215
6143