@depup/eslint-plugin-jsdoc 64.3.6-depup.0 → 64.3.8-depup.0

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/README.md CHANGED
@@ -13,10 +13,17 @@ npm install @depup/eslint-plugin-jsdoc
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [eslint-plugin-jsdoc](https://www.npmjs.com/package/eslint-plugin-jsdoc) @ 64.3.6 |
17
- | Processed | 2026-09-06 |
16
+ | Original | [eslint-plugin-jsdoc](https://www.npmjs.com/package/eslint-plugin-jsdoc) @ 64.3.8 |
17
+ | Processed | 2026-09-09 |
18
18
  | Smoke test | passed |
19
- | Deps updated | 0 |
19
+ | Deps updated | 2 |
20
+
21
+ ## Dependency Changes
22
+
23
+ | Dependency | From | To |
24
+ |------------|------|-----|
25
+ | @typescript-eslint/utils | ^8.69.0 | ^8.70.0 |
26
+ | comment-parser | 1.4.8 | ^1.4.9 |
20
27
 
21
28
  ---
22
29
 
package/changes.json CHANGED
@@ -1,5 +1,14 @@
1
1
  {
2
- "bumped": {},
3
- "timestamp": "2026-09-06T00:59:03.732Z",
4
- "totalUpdated": 0
2
+ "bumped": {
3
+ "@typescript-eslint/utils": {
4
+ "from": "^8.69.0",
5
+ "to": "^8.70.0"
6
+ },
7
+ "comment-parser": {
8
+ "from": "1.4.8",
9
+ "to": "^1.4.9"
10
+ }
11
+ },
12
+ "timestamp": "2026-09-09T16:10:08.502Z",
13
+ "totalUpdated": 2
5
14
  }
package/package.json CHANGED
@@ -7,9 +7,9 @@
7
7
  "dependencies": {
8
8
  "@es-joy/jsdoccomment": "~0.97.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",
@@ -162,13 +162,22 @@
162
162
  "test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
163
163
  "test-index": "pnpm run test-no-cov test/rules/index.js"
164
164
  },
165
- "version": "64.3.6-depup.0",
165
+ "version": "64.3.8-depup.0",
166
166
  "depup": {
167
- "changes": {},
168
- "depsUpdated": 0,
167
+ "changes": {
168
+ "@typescript-eslint/utils": {
169
+ "from": "^8.69.0",
170
+ "to": "^8.70.0"
171
+ },
172
+ "comment-parser": {
173
+ "from": "1.4.8",
174
+ "to": "^1.4.9"
175
+ }
176
+ },
177
+ "depsUpdated": 2,
169
178
  "originalPackage": "eslint-plugin-jsdoc",
170
- "originalVersion": "64.3.6",
171
- "processedAt": "2026-09-06T00:59:25.028Z",
179
+ "originalVersion": "64.3.8",
180
+ "processedAt": "2026-09-09T16:10:35.569Z",
172
181
  "smokeTest": "passed"
173
182
  }
174
183
  }
@@ -151,16 +151,22 @@ export const getJsdocProcessorPlugin = (options = {}) => {
151
151
  }
152
152
 
153
153
  /**
154
- * @type {{
154
+ * @typedef {{
155
155
  * targetTagName: string,
156
156
  * ext: string,
157
157
  * codeStartLine: number,
158
158
  * codeStartCol: number,
159
159
  * nonJSPrefacingCols: number,
160
160
  * commentLineCols: [number, number]
161
- * }[]}
161
+ * }} OtherInfo
162
+ */
163
+
164
+ /**
165
+ * Keyed by filename, as the same plugin instance preprocesses many files
166
+ * (including the example files it produces) before postprocessing them.
167
+ * @type {Map<string, OtherInfo[]>}
162
168
  */
163
- const otherInfo = [];
169
+ const otherInfoByFilename = new Map();
164
170
 
165
171
  /** @type {import('eslint').Linter.LintMessage[]} */
166
172
  let extraMessages = [];
@@ -169,8 +175,9 @@ export const getJsdocProcessorPlugin = (options = {}) => {
169
175
  * @param {JsdocBlockWithInline} jsdoc
170
176
  * @param {string} jsFileName
171
177
  * @param {[number, number]} commentLineCols
178
+ * @param {OtherInfo[]} otherInfo
172
179
  */
173
- const getTextsAndFileNames = (jsdoc, jsFileName, commentLineCols) => {
180
+ const getTextsAndFileNames = (jsdoc, jsFileName, commentLineCols, otherInfo) => {
174
181
  /**
175
182
  * @type {TextAndFileName[]}
176
183
  */
@@ -529,8 +536,12 @@ export const getJsdocProcessorPlugin = (options = {}) => {
529
536
  postprocess ([
530
537
  jsMessages,
531
538
  ...messages
532
- // eslint-disable-next-line no-unused-vars -- Placeholder
533
539
  ], filename) {
540
+ const otherInfo = /** @type {OtherInfo[]} */ (
541
+ otherInfoByFilename.get(filename)
542
+ );
543
+ otherInfoByFilename.delete(filename);
544
+
534
545
  for (const [
535
546
  idx,
536
547
  message,
@@ -559,7 +570,11 @@ export const getJsdocProcessorPlugin = (options = {}) => {
559
570
  // fix: {range: [number, number], text: string}
560
571
  // suggestions: {desc: , messageId:, fix: }[],
561
572
  } = msg;
573
+
574
+ // Ranges are relative to the example file, so drop them rather
575
+ // than let them be applied to the parent file
562
576
  delete msg.fix;
577
+ delete msg.suggestions;
563
578
 
564
579
  const [
565
580
  codeCtxLine,
@@ -600,6 +615,10 @@ export const getJsdocProcessorPlugin = (options = {}) => {
600
615
  */
601
616
  preprocess (text, filename) {
602
617
  try {
618
+ /** @type {OtherInfo[]} */
619
+ const otherInfo = [];
620
+ otherInfoByFilename.set(filename, otherInfo);
621
+
603
622
  let ast;
604
623
 
605
624
  // May be running a second time so catch and ignore
@@ -663,6 +682,7 @@ export const getJsdocProcessorPlugin = (options = {}) => {
663
682
  jsdoc,
664
683
  filename,
665
684
  commentLineCols[idx],
685
+ otherInfo,
666
686
  );
667
687
  }).filter(
668
688
  /**
@@ -482,8 +482,10 @@ export default iterateJsdoc(({
482
482
  .concat(tsModuleVariables)
483
483
  .concat(/** @type {string[]} */ (definedPreferredTypes))
484
484
  .concat((() => {
485
- // Other methods are not in scope, but we need them, and we grab them here
486
- if (node?.type === 'MethodDefinition') {
485
+ // Other class members are not in scope, but we need them (e.g., for a
486
+ // sibling property or method referenced by `{@link}`), and we grab
487
+ // them here
488
+ if (node?.type === 'MethodDefinition' || node?.type === 'PropertyDefinition') {
487
489
  return /** @type {import('estree').ClassBody} */ (node.parent).body.flatMap((methodOrProp) => {
488
490
  if (methodOrProp.type === 'MethodDefinition') {
489
491
  // eslint-disable-next-line unicorn/no-lonely-if -- Pattern