Socket
Book a DemoInstallSign in
Socket

eslint-plugin-jsdoc

Package Overview
Dependencies
Maintainers
1
Versions
713
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

to
53.0.1

1

dist/iterateJsdoc.d.ts

@@ -158,2 +158,3 @@ import * as _es_joy_jsdoccomment0 from "@es-joy/jsdoccomment";

isIteratingFunction: IsIteratingFunction;
isIteratingFunctionOrVariable: IsIteratingFunction;
isVirtualFunction: IsVirtualFunction;

@@ -160,0 +161,0 @@ stringify: Stringify;

23

dist/iterateJsdoc.js

@@ -412,2 +412,3 @@ import { hasValueOrExecutorHasNonEmptyResolveValue } from "./utils/hasReturnValue.js";

* isIteratingFunction: IsIteratingFunction,
* isIteratingFunctionOrVariable: IsIteratingFunction,
* isVirtualFunction: IsVirtualFunction,

@@ -580,11 +581,21 @@ * stringify: Stringify,

const { augmentsExtendsReplacesDocs, ignoreReplacesDocs, implementsReplacesDocs, maxLines, minLines, mode, overrideReplacesDocs, tagNamePreference } = settings;
const functionTypes = [
"ArrowFunctionExpression",
"FunctionDeclaration",
"FunctionExpression",
"MethodDefinition"
];
/** @type {IsIteratingFunction} */
utils.isIteratingFunction = () => {
return !iteratingAll || [
"ArrowFunctionExpression",
"FunctionDeclaration",
"FunctionExpression",
"MethodDefinition"
].includes(String(node && node.type));
return !iteratingAll || functionTypes.includes(String(node?.type));
};
/** @type {IsIteratingFunction} */
utils.isIteratingFunctionOrVariable = () => {
if (utils.isIteratingFunction()) return true;
/** @type {import('estree').VariableDeclarator[]} */
const declarations = node?.type === "VariableDeclaration" ? node.declarations : node?.type === "ExportNamedDeclaration" && node.declaration?.type === "VariableDeclaration" ? node.declaration.declarations : [];
return declarations.some(({ init }) => {
return functionTypes.includes(String(init?.type));
});
};
/** @type {IsVirtualFunction} */

@@ -591,0 +602,0 @@ utils.isVirtualFunction = () => {

@@ -5,3 +5,3 @@ import iterateJsdoc from "../iterateJsdoc.js";

var implementsOnClasses_default = iterateJsdoc(({ report, utils }) => {
const iteratingFunction = utils.isIteratingFunction();
const iteratingFunction = utils.isIteratingFunctionOrVariable();
if (iteratingFunction) {

@@ -8,0 +8,0 @@ if (utils.hasATag(["class", "constructor"]) || utils.isConstructor()) return;

@@ -12,3 +12,3 @@ import iterateJsdoc from "../iterateJsdoc.js";

var noTypes_default = iterateJsdoc(({ node, utils }) => {
if (!utils.isIteratingFunction() && !utils.isVirtualFunction()) return;
if (!utils.isIteratingFunctionOrVariable() && !utils.isVirtualFunction()) return;
const tags = utils.getPresentTags([

@@ -15,0 +15,0 @@ "param",

@@ -12,3 +12,3 @@ import iterateJsdoc from "../iterateJsdoc.js";

if (!functionExamples.length) {
if (exemptNoArguments && utils.isIteratingFunction() && !utils.hasParams()) return;
if (exemptNoArguments && utils.isIteratingFunctionOrVariable() && !utils.hasParams()) return;
utils.reportJSDoc(`Missing JSDoc @${targetTagName} declaration.`, null, () => {

@@ -15,0 +15,0 @@ if (enableFixer) utils.addTag(targetTagName);

@@ -173,3 +173,3 @@ {

},
"version": "53.0.0"
"version": "53.0.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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.