eslint-plugin-jsdoc
Advanced tools
Comparing version 48.9.3 to 48.10.0
@@ -155,3 +155,3 @@ { | ||
}, | ||
"version": "48.9.3" | ||
"version": "48.10.0" | ||
} |
@@ -23,3 +23,6 @@ import { | ||
/** | ||
* @param {import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration | ||
* @param {import('@typescript-eslint/types').TSESTree.FunctionDeclaration| | ||
* import('@typescript-eslint/types').TSESTree.ClassDeclaration| | ||
* import('@typescript-eslint/types').TSESTree.TSInterfaceDeclaration| | ||
* import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration | ||
*/ | ||
@@ -51,8 +54,17 @@ const checkParameters = (aliasDeclaration) => { | ||
switch (nde.type) { | ||
case 'ExportDefaultDeclaration': | ||
case 'ExportNamedDeclaration': | ||
if (nde.declaration?.type === 'TSTypeAliasDeclaration') { | ||
checkParameters(nde.declaration); | ||
switch (nde.declaration?.type) { | ||
case 'ClassDeclaration': | ||
case 'FunctionDeclaration': | ||
case 'TSTypeAliasDeclaration': | ||
case 'TSInterfaceDeclaration': | ||
checkParameters(nde.declaration); | ||
break; | ||
} | ||
break; | ||
case 'ClassDeclaration': | ||
case 'FunctionDeclaration': | ||
case 'TSTypeAliasDeclaration': | ||
case 'TSInterfaceDeclaration': | ||
checkParameters(nde); | ||
@@ -59,0 +71,0 @@ break; |
@@ -38,5 +38,8 @@ import { | ||
/** | ||
* @param {import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration | ||
* @param {import('@typescript-eslint/types').TSESTree.FunctionDeclaration| | ||
* import('@typescript-eslint/types').TSESTree.ClassDeclaration| | ||
* import('@typescript-eslint/types').TSESTree.TSInterfaceDeclaration| | ||
* import('@typescript-eslint/types').TSESTree.TSTypeAliasDeclaration} aliasDeclaration | ||
*/ | ||
const checkParameters = (aliasDeclaration) => { | ||
const checkTypeParams = (aliasDeclaration) => { | ||
/* c8 ignore next -- Guard */ | ||
@@ -54,3 +57,3 @@ const {params} = aliasDeclaration.typeParameters ?? {params: []}; | ||
const handleTypeAliases = () => { | ||
const handleTypes = () => { | ||
const nde = /** @type {import('@typescript-eslint/types').TSESTree.Node} */ ( | ||
@@ -63,9 +66,26 @@ node | ||
switch (nde.type) { | ||
case 'ExportDefaultDeclaration': | ||
switch (nde.declaration?.type) { | ||
case 'ClassDeclaration': | ||
case 'FunctionDeclaration': | ||
case 'TSInterfaceDeclaration': | ||
checkTypeParams(nde.declaration); | ||
break; | ||
} | ||
break; | ||
case 'ExportNamedDeclaration': | ||
if (nde.declaration?.type === 'TSTypeAliasDeclaration') { | ||
checkParameters(nde.declaration); | ||
switch (nde.declaration?.type) { | ||
case 'ClassDeclaration': | ||
case 'FunctionDeclaration': | ||
case 'TSTypeAliasDeclaration': | ||
case 'TSInterfaceDeclaration': | ||
checkTypeParams(nde.declaration); | ||
break; | ||
} | ||
break; | ||
case 'ClassDeclaration': | ||
case 'FunctionDeclaration': | ||
case 'TSTypeAliasDeclaration': | ||
checkParameters(nde); | ||
case 'TSInterfaceDeclaration': | ||
checkTypeParams(nde); | ||
break; | ||
@@ -77,3 +97,3 @@ } | ||
if (!typedefTags.length || typedefTags.length >= 2) { | ||
handleTypeAliases(); | ||
handleTypes(); | ||
return; | ||
@@ -80,0 +100,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 not supported yet
Sorry, the diff of this file is not supported yet
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
2035343
33363