Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-jsdoc

Package Overview
Dependencies
Maintainers
1
Versions
661
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jsdoc - npm Package Compare versions

Comparing version 48.9.3 to 48.10.0

2

package.json

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc