Socket
Socket
Sign inDemoInstall

eslint-plugin-jsdoc

Package Overview
Dependencies
Maintainers
1
Versions
656
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 46.9.0 to 46.9.1

12

dist/exportParser.js

@@ -53,4 +53,3 @@ "use strict";

if (symbol.type === 'literal') {
return (/** @type {ValueObject} */symbol.value.value
);
return /** @type {ValueObject} */symbol.value.value;
}

@@ -198,7 +197,7 @@

for (const method of node.body) {
val.props[/** @type {import('estree').Identifier} */ /** @type {import('estree').MethodDefinition} */method.key.name] = createNode();
val.props[/** @type {import('estree').Identifier} */( /** @type {import('estree').MethodDefinition} */method.key).name] = createNode();
/** @type {{[key: string]: CreatedNode}} */
val.props[/** @type {import('estree').Identifier} */ /** @type {import('estree').MethodDefinition} */method.key.name].type = 'object';
val.props[/** @type {import('estree').Identifier} */( /** @type {import('estree').MethodDefinition} */method.key).name].type = 'object';
/** @type {{[key: string]: CreatedNode}} */
val.props[/** @type {import('estree').Identifier} */ /** @type {import('estree').MethodDefinition} */method.key.name].value = /** @type {import('eslint').Rule.Node} */
val.props[/** @type {import('estree').Identifier} */( /** @type {import('estree').MethodDefinition} */method.key).name].value = /** @type {import('eslint').Rule.Node} */
/** @type {import('estree').MethodDefinition} */method.value;

@@ -228,3 +227,3 @@ }

val.props[/** @type {import('estree').PrivateIdentifier} */
/** @type {import('estree').Property} */prop.key.name] = propVal;
( /** @type {import('estree').Property} */prop.key).name] = propVal;
}

@@ -613,3 +612,2 @@ }

}
return false;

@@ -616,0 +614,0 @@ };

@@ -19,2 +19,3 @@ "use strict";

// type was problem/layout, etc.
const [,, ruleName, ...options] = process.argv;

@@ -21,0 +22,0 @@ const recommended = options.includes('--recommended');

@@ -481,2 +481,3 @@ "use strict";

*/
/**

@@ -545,2 +546,3 @@ * @typedef {BasicUtils & {

*/
const {

@@ -877,3 +879,3 @@ rewireSpecs,

if (descLines.length) {
jsdoc.source.splice( /** @type {Integer} */startIdx, /** @type {Integer} */endIdx - /** @type {Integer} */startIdx, ...setter(
jsdoc.source.splice( /** @type {Integer} */startIdx, /** @type {Integer} */endIdx - ( /** @type {Integer} */startIdx), ...setter(
/**

@@ -986,3 +988,3 @@ * @type {{

for (const item of ['postDelimiter', 'tag', 'postTag', 'type', 'postType', 'name', 'postName', 'description']) {
tokens[
tokens[(
/**

@@ -992,3 +994,3 @@ * @type {"postDelimiter"|"tag"|"type"|"postType"|

*/
item] = '';
item)] = '';
}

@@ -1007,3 +1009,3 @@ } else {

for (const [idx, src] of jsdoc.source.slice(lastIndex).entries()) {
src.number = firstNumber + /** @type {Integer} */lastIndex + idx;
src.number = firstNumber + ( /** @type {Integer} */lastIndex) + idx;
}

@@ -1064,3 +1066,3 @@

for (const prop of ['start', 'postDelimiter', 'tag', 'type', 'postType', 'postTag', 'name', 'postName', 'description', 'end', 'lineEnd']) {
tokens[
tokens[(
/**

@@ -1070,3 +1072,3 @@ * @type {"start"|"postDelimiter"|"tag"|"type"|"postType"|

*/
prop] = '';
prop)] = '';
}

@@ -1139,3 +1141,3 @@ };

for (const [idx, src] of jsdoc.source.slice(lastIndex).entries()) {
src.number = firstNumber + /** @type {Integer} */lastIndex + idx;
src.number = firstNumber + ( /** @type {Integer} */lastIndex) + idx;
}

@@ -1222,2 +1224,3 @@ };

node.generator || node.type === 'MethodDefinition' && node.value.generator || ['ExportNamedDeclaration', 'ExportDefaultDeclaration'].includes(node.type) && /** @type {import('estree').FunctionDeclaration} */
(
/**

@@ -1227,3 +1230,3 @@ * @type {import('estree').ExportNamedDeclaration|

*/
node.declaration.generator);
node.declaration).generator);
};

@@ -1313,6 +1316,6 @@

/** @type {TagMightHaveNamePositionTypePosition} */
utils[/** @type {"tagMightHaveNamePosition"|"tagMightHaveTypePosition"} */
method] = (tagName, otherModeMaps) => {
const result = _jsdocUtils.default[/** @type {"tagMightHaveNamePosition"|"tagMightHaveTypePosition"} */
method](tagName);
utils[( /** @type {"tagMightHaveNamePosition"|"tagMightHaveTypePosition"} */
method)] = (tagName, otherModeMaps) => {
const result = _jsdocUtils.default[( /** @type {"tagMightHaveNamePosition"|"tagMightHaveTypePosition"} */
method)](tagName);
if (result) {

@@ -1325,4 +1328,4 @@ return true;

const otherResult = otherModeMaps.some(otherModeMap => {
return _jsdocUtils.default[/** @type {"tagMightHaveNamePosition"|"tagMightHaveTypePosition"} */
method](tagName, otherModeMap);
return _jsdocUtils.default[( /** @type {"tagMightHaveNamePosition"|"tagMightHaveTypePosition"} */
method)](tagName, otherModeMap);
});

@@ -1350,6 +1353,6 @@ return otherResult ? {

/** @type {TagMustHave} */
utils[/** @type {"tagMustHaveNamePosition"|"tagMustHaveTypePosition"} */
method] = (tagName, otherModeMaps) => {
const result = _jsdocUtils.default[/** @type {"tagMustHaveNamePosition"|"tagMustHaveTypePosition"} */
method](tagName);
utils[( /** @type {"tagMustHaveNamePosition"|"tagMustHaveTypePosition"} */
method)] = (tagName, otherModeMaps) => {
const result = _jsdocUtils.default[( /** @type {"tagMustHaveNamePosition"|"tagMustHaveTypePosition"} */
method)](tagName);
if (!result) {

@@ -1362,4 +1365,4 @@ return false;

const otherResult = otherModeMaps.every(otherModeMap => {
return _jsdocUtils.default[/** @type {"tagMustHaveNamePosition"|"tagMustHaveTypePosition"} */
method](tagName, otherModeMap);
return _jsdocUtils.default[( /** @type {"tagMustHaveNamePosition"|"tagMustHaveTypePosition"} */
method)](tagName, otherModeMap);
});

@@ -1373,6 +1376,6 @@ return otherResult ? true : {

/** @type {IsNamepathX} */
utils[/** @type {"isNamepathDefiningTag"|"isNamepathReferencingTag"|"isNamepathOrUrlReferencingTag"|"tagMightHaveNamepath"} */
method] = tagName => {
return _jsdocUtils.default[/** @type {"isNamepathDefiningTag"|"isNamepathReferencingTag"|"isNamepathOrUrlReferencingTag"|"tagMightHaveNamepath"} */
method](tagName);
utils[( /** @type {"isNamepathDefiningTag"|"isNamepathReferencingTag"|"isNamepathOrUrlReferencingTag"|"tagMightHaveNamepath"} */
method)] = tagName => {
return _jsdocUtils.default[( /** @type {"isNamepathDefiningTag"|"isNamepathReferencingTag"|"isNamepathOrUrlReferencingTag"|"tagMightHaveNamepath"} */
method)](tagName);
};

@@ -1418,3 +1421,3 @@ }

utils.isAsync = () => {
return 'async' in /** @type {Node} */node && node.async;
return 'async' in ( /** @type {Node} */node) && node.async;
};

@@ -1641,3 +1644,3 @@

}
const lineNumber = /** @type {import('eslint').AST.SourceLocation} */commentNode.loc.start.line + /** @type {Integer} */jsdocLoc.line;
const lineNumber = /** @type {import('eslint').AST.SourceLocation} */commentNode.loc.start.line + ( /** @type {Integer} */jsdocLoc.line);
loc = {

@@ -1770,3 +1773,3 @@ end: {

jsdoc,
jsdocNode:
jsdocNode: (
/**

@@ -1776,3 +1779,3 @@ * @type {import('eslint').Rule.Node & {

*/
jsdocNde,
jsdocNde),
node,

@@ -1963,4 +1966,4 @@ report,

trackedJsdocs.add(commentNode);
callIterator(context, node, [/** @type {import('estree').Comment} */
commentNode], /** @type {StateObject} */state);
callIterator(context, node, [( /** @type {import('estree').Comment} */
commentNode)], /** @type {StateObject} */state);
},

@@ -2004,3 +2007,3 @@ 'Program:exit'() {

iterator({
allComments: /** @type {import('estree').Node[]} */allComms,
allComments: ( /** @type {import('estree').Node[]} */allComms),
context,

@@ -2081,3 +2084,3 @@ makeReport,

if (hasPlainAny || hasObjectAny) {
return iterateAllJsdocs(iterator, ruleConfig, hasObjectAny ? /** @type {ContextObject[]} */contexts : null, ruleConfig.matchContext).create(context);
return iterateAllJsdocs(iterator, ruleConfig, hasObjectAny ? ( /** @type {ContextObject[]} */contexts) : null, ruleConfig.matchContext).create(context);
}

@@ -2084,0 +2087,0 @@ }

@@ -23,2 +23,3 @@ "use strict";

*/
/**

@@ -162,3 +163,3 @@ * @type {import('./getDefaultTagStructureForMode.js').TagStructure}

return [/** @type {import('@typescript-eslint/types').TSESTree.Identifier} */propSignature.key.name, propSignature.typeAnnotation.typeAnnotation.members.map(member => {
return (/** @type {string} */
return /** @type {string} */(
getPropertiesFromPropertySignature( /** @type {import('@typescript-eslint/types').TSESTree.TSPropertySignature} */

@@ -169,4 +170,3 @@ member)

}
return (/** @type {import('@typescript-eslint/types').TSESTree.Identifier} */propSignature.key.name
);
return /** @type {import('@typescript-eslint/types').TSESTree.Identifier} */propSignature.key.name;
};

@@ -251,4 +251,3 @@

return [/** @type {import('estree').Identifier} */param.key.name, /** @type {import('estree').ObjectPattern} */param.value.properties.map(prop => {
return (/** @type {string|[string, string[]]} */getParamName(prop, isProperty)
);
return /** @type {string|[string, string[]]} */getParamName(prop, isProperty);
})];

@@ -263,5 +262,4 @@ }

return [/** @type {import('estree').Identifier} */param.key.name, /** @type {import('estree').AssignmentPattern} */param.value.right.properties.map(prop => {
return (/** @type {string} */getParamName( /** @type {import('estree').Property} */
prop, isProperty)
);
return /** @type {string} */getParamName( /** @type {import('estree').Property} */
prop, isProperty);
})];

@@ -292,6 +290,5 @@ }

case 'Literal':
return (/** @type {string} */param.key.raw ||
// istanbul ignore next -- `raw` may not be present in all parsers
param.key.value
);
return /** @type {string} */param.key.raw ||
// istanbul ignore next -- `raw` may not be present in all parsers
param.key.value;

@@ -321,3 +318,3 @@ // case 'MemberExpression':

isRestProperty: isProperty,
name: /** @type {import('@typescript-eslint/types').TSESTree.Identifier} */ /** @type {import('@typescript-eslint/types').TSESTree.RestElement} */param.argument.name,
name: /** @type {import('@typescript-eslint/types').TSESTree.Identifier} */( /** @type {import('@typescript-eslint/types').TSESTree.RestElement} */param.argument).name,
restElement: true

@@ -346,4 +343,3 @@ };

// Should also check `functionNode.value.params` if supporting `MethodDefinition`
return (/** @type {import('@typescript-eslint/types').TSESTree.FunctionDeclaration} */functionNode.params.length
);
return /** @type {import('@typescript-eslint/types').TSESTree.FunctionDeclaration} */functionNode.params.length;
};

@@ -606,4 +602,3 @@

}
return (/** @type {Map<string, string | boolean>} */map.get(tag)
);
return /** @type {Map<string, string | boolean>} */map.get(tag);
};

@@ -698,4 +693,3 @@

const tagStruct = ensureMap(tagMap, tag);
return (/** @type {boolean|undefined} */tagStruct.get('typeRequired')
);
return /** @type {boolean|undefined} */tagStruct.get('typeRequired');
};

@@ -747,4 +741,3 @@

const tagStruct = ensureMap(tagMap, tag);
return (/** @type {boolean|undefined} */tagStruct.get('nameRequired')
);
return /** @type {boolean|undefined} */tagStruct.get('nameRequired');
};

@@ -768,4 +761,3 @@

const tagStruct = ensureMap(tagMap, tag);
return (/** @type {boolean} */tagStruct.get('typeOrNameRequired')
);
return /** @type {boolean} */tagStruct.get('typeOrNameRequired');
};

@@ -959,5 +951,4 @@

const hasYieldValue = (node, checkYieldReturnValue) => {
return (/** @type {import('@typescript-eslint/types').TSESTree.FunctionDeclaration} */node.generator && ( /** @type {import('@typescript-eslint/types').TSESTree.FunctionDeclaration} */node.expression || hasNonFunctionYield( /** @type {import('@typescript-eslint/types').TSESTree.FunctionDeclaration} */
node.body, checkYieldReturnValue))
);
return /** @type {import('@typescript-eslint/types').TSESTree.FunctionDeclaration} */node.generator && ( /** @type {import('@typescript-eslint/types').TSESTree.FunctionDeclaration} */node.expression || hasNonFunctionYield( /** @type {import('@typescript-eslint/types').TSESTree.FunctionDeclaration} */
node.body, checkYieldReturnValue));
};

@@ -964,0 +955,0 @@

@@ -304,3 +304,3 @@ "use strict";

if (typeof jsFileName === 'string' && jsFileName.includes('.')) {
defaultFileName = jsFileName.replace(/\..*?$/u, `.${ext}`);
defaultFileName = jsFileName.replace(/\.[^.]*$/u, `.${ext}`);
} else {

@@ -307,0 +307,0 @@ defaultFileName = `dummy.${ext}`;

@@ -199,3 +199,3 @@ "use strict";

// Skip if it contains only a single line.
if (!
if (!(
/**

@@ -206,3 +206,3 @@ * @type {import('eslint').Rule.Node & {

*/
jsdocNode.value.includes('\n')) {
jsdocNode.value.includes('\n'))) {
return;

@@ -209,0 +209,0 @@ }

@@ -151,3 +151,3 @@ "use strict";

}
const validTags = [...definedTags, ... /** @type {string[]} */definedPreferredTags, ...definedNonPreferredTags, ...definedStructuredTags, ...(typed ? typedTagsNeedingName : [])];
const validTags = [...definedTags, ...( /** @type {string[]} */definedPreferredTags), ...definedNonPreferredTags, ...definedStructuredTags, ...(typed ? typedTagsNeedingName : [])];
if (utils.isValidTag(tagName, validTags)) {

@@ -154,0 +154,0 @@ let preferredTagName = utils.getPreferredTagName({

@@ -223,3 +223,3 @@ "use strict";

*/
parentNode !== null && parentNode !== void 0 && (_parentNode$elements = parentNode.elements) !== null && _parentNode$elements !== void 0 && _parentNode$elements.length &&
parentNode !== null && parentNode !== void 0 && (_parentNode$elements = parentNode.elements) !== null && _parentNode$elements !== void 0 && _parentNode$elements.length && (
/**

@@ -232,3 +232,3 @@ * @type {import('jsdoc-type-pratt-parser').GenericResult}

*/
(parentNode === null || parentNode === void 0 || (_parentNode$left2 = parentNode.left) === null || _parentNode$left2 === void 0 ? void 0 : _parentNode$left2.value) === 'Object')) {
(parentNode === null || parentNode === void 0 || (_parentNode$left2 = parentNode.left) === null || _parentNode$left2 === void 0 ? void 0 : _parentNode$left2.value) === 'Object'))) {
continue;

@@ -235,0 +235,0 @@ }

@@ -36,3 +36,2 @@ "use strict";

};
const moduleCheck = new Map();

@@ -39,0 +38,0 @@ var _default = exports.default = (0, _iterateJsdoc.default)(({

@@ -31,3 +31,3 @@ "use strict";

tags = ['*']
} = match[/** @type {import('../iterateJsdoc.js').Integer} */lastIndex];
} = match[( /** @type {import('../iterateJsdoc.js').Integer} */lastIndex)];
const allowNameRegex = allowName && utils.getRegexFromString(allowName);

@@ -60,3 +60,3 @@ const disallowNameRegex = disallowName && utils.getRegexFromString(disallowName);

message
} = match[/** @type {import('../iterateJsdoc.js').Integer} */lastIndex];
} = match[( /** @type {import('../iterateJsdoc.js').Integer} */lastIndex)];
if (!message) {

@@ -63,0 +63,0 @@ if (hasRegex) {

@@ -86,3 +86,3 @@ "use strict";

for (const prop of ['delimiter', 'postDelimiter', 'tag', 'type', 'lineEnd', 'postType', 'postTag', 'name', 'postName', 'description']) {
finalLineTokens[
finalLineTokens[(
/**

@@ -93,3 +93,3 @@ * @type {"delimiter"|"postDelimiter"|"tag"|"type"|

*/
prop] = '';
prop)] = '';
}

@@ -96,0 +96,0 @@ utils.addLine(jsdoc.source.length - 1, {

@@ -21,2 +21,3 @@ "use strict";

*/
/**

@@ -23,0 +24,0 @@ * @param {import('../iterateJsdoc.js').StateObject} state

@@ -164,3 +164,3 @@ "use strict";

try {
const potentialType = tag[/** @type {"type"|"name"|"namepathOrURL"} */propertyName];
const potentialType = tag[( /** @type {"type"|"name"|"namepathOrURL"} */propertyName)];
return {

@@ -167,0 +167,0 @@ parsedType: mode === 'permissive' ? (0, _jsdoccomment.tryParse)( /** @type {string} */potentialType) : (0, _jsdoccomment.parse)( /** @type {string} */potentialType, mode),

@@ -20,2 +20,3 @@ "use strict";

*/
/** @type {import('json-schema').JSONSchema4} */

@@ -161,4 +162,3 @@ const OPTIONS_SCHEMA = {

}
return (/** @type {{[key: string]: {default?: boolean|undefined}}} */baseObject.properties[key].default
);
return /** @type {{[key: string]: {default?: boolean|undefined}}} */baseObject.properties[key].default;
};

@@ -215,5 +215,5 @@

})( /** @type {import('json-schema').JSONSchema4Object} */
/** @type {import('json-schema').JSONSchema4Object} */
/** @type {import('json-schema').JSONSchema4Object} */
OPTIONS_SCHEMA.properties.publicOnly.oneOf[1]),
( /** @type {import('json-schema').JSONSchema4Object} */
( /** @type {import('json-schema').JSONSchema4Object} */
OPTIONS_SCHEMA.properties.publicOnly).oneOf)[1]),
require: (baseObj => {

@@ -350,3 +350,3 @@ /** @type {{[key: string]: boolean|undefined}} */

text: sourceCode.getText( /** @type {import('eslint').Rule.Node} */baseNode, /** @type {import('eslint').AST.SourceLocation} */
/** @type {import('eslint').Rule.Node} */baseNode.loc.start.column)
( /** @type {import('eslint').Rule.Node} */baseNode.loc).start.column)
});

@@ -353,0 +353,0 @@ const {

@@ -12,2 +12,3 @@ "use strict";

*/
/**

@@ -14,0 +15,0 @@ * @param {string[]} desiredRoots

@@ -79,3 +79,3 @@ "use strict";

// In case a return value is declared in JSDoc, we also expect one in the code.
if (!returnNever && (reportMissingReturnForUndefinedTypes || !utils.mayBeUndefinedTypeTag(tag)) && (tag.type === '' && !utils.hasValueOrExecutorHasNonEmptyResolveValue(exemptAsync) || tag.type !== '' && !utils.hasValueOrExecutorHasNonEmptyResolveValue(exemptAsync, true)) && (!exemptGenerators || !('generator' in /** @type {import('../iterateJsdoc.js').Node} */node) || !node.generator)) {
if (!returnNever && (reportMissingReturnForUndefinedTypes || !utils.mayBeUndefinedTypeTag(tag)) && (tag.type === '' && !utils.hasValueOrExecutorHasNonEmptyResolveValue(exemptAsync) || tag.type !== '' && !utils.hasValueOrExecutorHasNonEmptyResolveValue(exemptAsync, true)) && (!exemptGenerators || !('generator' in ( /** @type {import('../iterateJsdoc.js').Node} */node)) || !node.generator)) {
report(`JSDoc @${tagName} declaration present but return expression not available in function.`);

@@ -82,0 +82,0 @@ }

@@ -360,4 +360,4 @@ "use strict";

const itemsToMoveRange = [...Array.from({
length: jsdoc.tags.length - /** @type {import('../iterateJsdoc.js').Integer} */
firstChangedTagIndex
length: jsdoc.tags.length - ( /** @type {import('../iterateJsdoc.js').Integer} */
firstChangedTagIndex)
}).keys()];

@@ -373,3 +373,3 @@ const unchangedPriorTagDescriptions = jsdoc.tags.slice(0, firstChangedTagIndex).reduce((ct, {

// tag begins, but it must also account for prior descriptions
const initialOffset = /** @type {import('../iterateJsdoc.js').Integer} */firstLine + /** @type {import('../iterateJsdoc.js').Integer} */firstChangedTagIndex +
const initialOffset = /** @type {import('../iterateJsdoc.js').Integer} */firstLine + ( /** @type {import('../iterateJsdoc.js').Integer} */firstChangedTagIndex) +
// May be the first tag, so don't try finding a prior one if so

@@ -380,4 +380,4 @@ unchangedPriorTagDescriptions;

for (const idx of itemsToMoveRange) {
utils.removeTag(idx + /** @type {import('../iterateJsdoc.js').Integer} */
firstChangedTagIndex);
utils.removeTag(idx + ( /** @type {import('../iterateJsdoc.js').Integer} */
firstChangedTagIndex));
}

@@ -407,4 +407,4 @@ const changedTags = sortedTags.slice(firstChangedTagIndex);

};
utils.reportJSDoc(`Tags are not in the prescribed order: ${tagList.join(', ') || '(alphabetical)'}`, jsdoc.tags[/** @type {import('../iterateJsdoc.js').Integer} */
firstChangedTagIndex], fix, true);
utils.reportJSDoc(`Tags are not in the prescribed order: ${tagList.join(', ') || '(alphabetical)'}`, jsdoc.tags[( /** @type {import('../iterateJsdoc.js').Integer} */
firstChangedTagIndex)], fix, true);
}, {

@@ -411,0 +411,0 @@ iterateAllJsdocs: true,

@@ -92,4 +92,4 @@ "use strict";

utils.removeTag(tagIdx, {
tagSourceOffset: /** @type {import('../iterateJsdoc.js').Integer} */
reportIndex
tagSourceOffset: ( /** @type {import('../iterateJsdoc.js').Integer} */
reportIndex)
});

@@ -96,0 +96,0 @@ };

@@ -28,4 +28,3 @@ "use strict";

var _node$typeParameters;
return (/** @type {import('@typescript-eslint/types').TSESTree.TSTypeReference} */(node === null || node === void 0 || (_node$typeParameters = node.typeParameters) === null || _node$typeParameters === void 0 || (_node$typeParameters = _node$typeParameters.params) === null || _node$typeParameters === void 0 || (_node$typeParameters = _node$typeParameters[0]) === null || _node$typeParameters === void 0 ? void 0 : _node$typeParameters.type) === 'TSVoidKeyword'
);
return /** @type {import('@typescript-eslint/types').TSESTree.TSTypeReference} */(node === null || node === void 0 || (_node$typeParameters = node.typeParameters) === null || _node$typeParameters === void 0 || (_node$typeParameters = _node$typeParameters.params) === null || _node$typeParameters === void 0 || (_node$typeParameters = _node$typeParameters[0]) === null || _node$typeParameters === void 0 ? void 0 : _node$typeParameters.type) === 'TSVoidKeyword';
};

@@ -205,8 +204,7 @@ const undefinedKeywords = new Set(['TSVoidKeyword', 'TSUndefinedKeyword', 'TSNeverKeyword']);

{
return (/** @type {import('@typescript-eslint/types').TSESTree.SwitchStatement} */node.cases.every(someCase => {
return !someCase.consequent.some(consNode => {
return consNode.type === 'BreakStatement' || consNode.type === 'ReturnStatement' && consNode.argument === null;
});
})
);
return /** @type {import('@typescript-eslint/types').TSESTree.SwitchStatement} */node.cases.every(someCase => {
return !someCase.consequent.some(consNode => {
return consNode.type === 'BreakStatement' || consNode.type === 'ReturnStatement' && consNode.argument === null;
});
});
}

@@ -267,11 +265,10 @@ case 'ThrowStatement':

case 'CallExpression':
return (/** @type {import('@typescript-eslint/types').TSESTree.Identifier} */node.callee.name === resolverName && (
// Implicit or explicit undefined
node.arguments.length > 1 || node.arguments[0] !== undefined) || node.arguments.some(nde => {
// Being passed in to another function (which might invoke it)
return nde.type === 'Identifier' && nde.name === resolverName ||
// Handle nested items
hasNonEmptyResolverCall(nde, resolverName);
})
);
return /** @type {import('@typescript-eslint/types').TSESTree.Identifier} */node.callee.name === resolverName && (
// Implicit or explicit undefined
node.arguments.length > 1 || node.arguments[0] !== undefined) || node.arguments.some(nde => {
// Being passed in to another function (which might invoke it)
return nde.type === 'Identifier' && nde.name === resolverName ||
// Handle nested items
hasNonEmptyResolverCall(nde, resolverName);
});
case 'ChainExpression':

@@ -488,3 +485,3 @@ case 'Decorator':

*/
/** @type {import('@typescript-eslint/types').TSESTree.NewExpression} */prom.arguments[0] || {};
( /** @type {import('@typescript-eslint/types').TSESTree.NewExpression} */prom.arguments[0]) || {};
if (!(params !== null && params !== void 0 && params.length)) {

@@ -491,0 +488,0 @@ return false;

@@ -16,8 +16,8 @@ {

"semver": "^7.5.4",
"spdx-expression-parse": "^3.0.1"
"spdx-expression-parse": "^4.0.0"
},
"description": "JSDoc linting rules for ESLint.",
"devDependencies": {
"@babel/cli": "^7.23.0",
"@babel/core": "^7.23.3",
"@babel/cli": "^7.23.4",
"@babel/core": "^7.23.5",
"@babel/eslint-parser": "^7.23.3",

@@ -27,13 +27,13 @@ "@babel/node": "^7.22.19",

"@babel/plugin-transform-flow-strip-types": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@babel/preset-env": "^7.23.5",
"@babel/register": "^7.22.15",
"@es-joy/escodegen": "^3.5.1",
"@es-joy/jsdoc-eslint-parser": "^0.19.0",
"@es-joy/jsdoc-eslint-parser": "^0.20.0",
"@hkdobrev/run-if-changed": "^0.3.1",
"@semantic-release/commit-analyzer": "^11.1.0",
"@semantic-release/github": "^9.2.3",
"@semantic-release/npm": "^11.0.1",
"@types/chai": "^4.3.10",
"@semantic-release/github": "^9.2.5",
"@semantic-release/npm": "^11.0.2",
"@types/chai": "^4.3.11",
"@types/debug": "^4.1.12",
"@types/eslint": "^8.44.7",
"@types/eslint": "^8.44.8",
"@types/esquery": "^1.5.3",

@@ -43,7 +43,7 @@ "@types/estree": "^1.0.5",

"@types/lodash.defaultsdeep": "^4.6.9",
"@types/mocha": "^10.0.4",
"@types/node": "^20.9.0",
"@types/semver": "^7.5.5",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.4",
"@types/semver": "^7.5.6",
"@types/spdx-expression-parse": "^3.0.5",
"@typescript-eslint/parser": "^6.10.0",
"@typescript-eslint/parser": "^6.13.2",
"babel-plugin-add-module-exports": "^1.0.4",

@@ -55,4 +55,4 @@ "babel-plugin-istanbul": "^6.1.1",

"decamelize": "^5.0.1",
"eslint": "8.53.0",
"eslint-config-canonical": "~42.3.0",
"eslint": "8.55.0",
"eslint-config-canonical": "~42.8.0",
"espree": "^9.6.1",

@@ -64,3 +64,3 @@ "gitdown": "^3.1.5",

"json-schema": "^0.4.0",
"lint-staged": "^15.0.2",
"lint-staged": "^15.2.0",
"lodash.defaultsdeep": "^4.6.1",

@@ -71,4 +71,4 @@ "mocha": "^10.2.0",

"rimraf": "^5.0.5",
"semantic-release": "^22.0.7",
"typescript": "5.2.2"
"semantic-release": "^22.0.10",
"typescript": "5.3.3"
},

@@ -149,3 +149,3 @@ "engines": {

},
"version": "46.9.0"
"version": "46.9.1"
}

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

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

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

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

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