eslint-plugin-jsdoc 64.5.2 → 64.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "url": "http://gajus.com"
6
6
  },
7
7
  "dependencies": {
8
- "@es-joy/jsdoccomment": "~0.97.0",
8
+ "@es-joy/jsdoccomment": "~0.98.0",
9
9
  "@es-joy/resolve.exports": "1.2.0",
10
- "@typescript-eslint/utils": "^8.69.0",
10
+ "@typescript-eslint/utils": "^8.70.0",
11
11
  "are-docs-informative": "^0.1.1",
12
- "comment-parser": "1.4.8",
12
+ "comment-parser": "1.4.9",
13
13
  "debug": "^4.4.3",
14
14
  "escape-string-regexp": "^5.0.0",
15
15
  "espree": "^11.2.0",
@@ -24,10 +24,10 @@
24
24
  "description": "JSDoc linting rules for ESLint.",
25
25
  "devDependencies": {
26
26
  "@arethetypeswrong/cli": "^0.18.5",
27
- "@babel/core": "8.0.1",
28
- "@babel/eslint-parser": "8.0.1",
27
+ "@babel/core": "8.0.5",
28
+ "@babel/eslint-parser": "8.0.5",
29
29
  "@babel/plugin-transform-flow-strip-types": "8.0.1",
30
- "@babel/preset-env": "8.0.2",
30
+ "@babel/preset-env": "8.0.5",
31
31
  "@es-joy/escodegen": "^4.2.0",
32
32
  "@es-joy/jsdoc-eslint-parser": "^0.29.0",
33
33
  "@eslint/core": "^1.2.1",
@@ -41,10 +41,10 @@
41
41
  "@types/estree": "^1.0.9",
42
42
  "@types/json-schema": "^7.0.15",
43
43
  "@types/mocha": "^10.0.10",
44
- "@types/node": "^26.4.1",
44
+ "@types/node": "^26.6.1",
45
45
  "@types/semver": "^7.8.0",
46
46
  "@types/spdx-expression-parse": "^4.0.0",
47
- "@typescript-eslint/types": "8.69.0",
47
+ "@typescript-eslint/types": "8.70.0",
48
48
  "babel-plugin-add-module-exports": "^1.0.4",
49
49
  "babel-plugin-transform-import-meta": "^3.0.0",
50
50
  "c8": "^12.0.0",
@@ -57,11 +57,11 @@
57
57
  "glob": "^13.0.6",
58
58
  "globals": "^17.12.0",
59
59
  "husky": "^9.1.7",
60
- "jsdoc-type-pratt-parser": "^9.2.1",
60
+ "jsdoc-type-pratt-parser": "^9.2.2",
61
61
  "json-schema": "^0.4.0",
62
62
  "json-schema-to-typescript": "^16.0.0",
63
- "lint-staged": "^17.5.0",
64
- "mocha": "^12.0.0",
63
+ "lint-staged": "^17.5.1",
64
+ "mocha": "^12.0.2",
65
65
  "open-editor": "^6.0.0",
66
66
  "playwright": "^1.63.0",
67
67
  "replace": "^1.2.2",
@@ -70,7 +70,7 @@
70
70
  "sinon": "^22.1.0",
71
71
  "ts-api-utils": "^2.5.0",
72
72
  "typescript": "6.0.3",
73
- "typescript-eslint": "8.69.0"
73
+ "typescript-eslint": "8.70.0"
74
74
  },
75
75
  "engines": {
76
76
  "node": "^22.22.2 || >=24.15.0"
@@ -163,5 +163,5 @@
163
163
  "test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
164
164
  "test-index": "pnpm run test-no-cov test/rules/index.js"
165
165
  },
166
- "version": "64.5.2"
166
+ "version": "64.5.3"
167
167
  }
@@ -482,6 +482,14 @@ export default iterateJsdoc(({
482
482
  .concat(tsModuleVariables)
483
483
  .concat(/** @type {string[]} */ (definedPreferredTypes))
484
484
  .concat((() => {
485
+ let nodeToCheck = node;
486
+ if (node?.type === 'ExportNamedDeclaration' || node?.type === 'ExportDefaultDeclaration') {
487
+ nodeToCheck = /** @type {import('estree').ClassDeclaration & import('eslint').Rule.NodeParentExtension} */ (
488
+ /** @type {import('estree').ExportNamedDeclaration & import('eslint').Rule.NodeParentExtension} */
489
+ (nodeToCheck)?.declaration
490
+ );
491
+ }
492
+
485
493
  // Other class members are not in scope, but we need them (e.g., for a
486
494
  // sibling property or method referenced by `{@link}`, or a member
487
495
  // referenced by `{@link}` from the class's own JSDoc block), and we
@@ -490,14 +498,14 @@ export default iterateJsdoc(({
490
498
  let classBody;
491
499
  /** @type {string|undefined} */
492
500
  let className;
493
- if (node?.type === 'MethodDefinition' || node?.type === 'PropertyDefinition') {
494
- classBody = /** @type {import('estree').ClassBody} */ (node.parent);
501
+ if (nodeToCheck?.type === 'MethodDefinition' || nodeToCheck?.type === 'PropertyDefinition') {
502
+ classBody = /** @type {import('estree').ClassBody} */ (nodeToCheck.parent);
495
503
  className = /** @type {import('estree').ClassDeclaration} */ (
496
- node.parent?.parent
504
+ nodeToCheck.parent?.parent
497
505
  )?.id?.name;
498
- } else if (node?.type === 'ClassDeclaration' || node?.type === 'ClassExpression') {
499
- classBody = node.body;
500
- className = node.id?.name;
506
+ } else if (nodeToCheck?.type === 'ClassDeclaration' || nodeToCheck?.type === 'ClassExpression') {
507
+ classBody = nodeToCheck.body;
508
+ className = nodeToCheck.id?.name;
501
509
  }
502
510
 
503
511
  if (classBody) {