@depup/eslint-plugin-jsdoc 65.2.2-depup.0 → 65.2.4-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 +2 -2
- package/changes.json +1 -1
- package/package.json +3 -3
- package/src/iterateJsdoc.js +1 -0
- package/src/rules/convertToJsdocComments.js +16 -4
- package/src/rules/requireJsdoc.js +4 -2
- package/src/rules/requireParam.js +1 -1
- package/src/rules/tagLines.js +3 -0
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ 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) @ 65.2.
|
|
17
|
-
| Processed | 2026-10-
|
|
16
|
+
| Original | [eslint-plugin-jsdoc](https://www.npmjs.com/package/eslint-plugin-jsdoc) @ 65.2.4 |
|
|
17
|
+
| Processed | 2026-10-10 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 1 |
|
|
20
20
|
|
package/changes.json
CHANGED
package/package.json
CHANGED
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
|
|
169
169
|
"test-index": "pnpm run test-no-cov test/rules/index.js"
|
|
170
170
|
},
|
|
171
|
-
"version": "65.2.
|
|
171
|
+
"version": "65.2.4-depup.0",
|
|
172
172
|
"depup": {
|
|
173
173
|
"changes": {
|
|
174
174
|
"@typescript-eslint/utils": {
|
|
@@ -178,8 +178,8 @@
|
|
|
178
178
|
},
|
|
179
179
|
"depsUpdated": 1,
|
|
180
180
|
"originalPackage": "eslint-plugin-jsdoc",
|
|
181
|
-
"originalVersion": "65.2.
|
|
182
|
-
"processedAt": "2026-10-
|
|
181
|
+
"originalVersion": "65.2.4",
|
|
182
|
+
"processedAt": "2026-10-10T08:11:40.592Z",
|
|
183
183
|
"smokeTest": "passed"
|
|
184
184
|
}
|
|
185
185
|
}
|
package/src/iterateJsdoc.js
CHANGED
|
@@ -64,7 +64,7 @@ export default {
|
|
|
64
64
|
* @param {string} messageId
|
|
65
65
|
* @param {import('estree').Comment|Token} comment
|
|
66
66
|
* @param {import('eslint').Rule.Node} node
|
|
67
|
-
* @param {import('eslint').Rule.ReportFixer} fixer
|
|
67
|
+
* @param {import('eslint').Rule.ReportFixer|null} fixer
|
|
68
68
|
*/
|
|
69
69
|
const report = (messageId, comment, node, fixer) => {
|
|
70
70
|
const loc = {
|
|
@@ -167,9 +167,21 @@ export default {
|
|
|
167
167
|
* @param {Token} [locComment] Comment to anchor the report location to,
|
|
168
168
|
* e.g., the first comment of a stacked group of line comments, so the
|
|
169
169
|
* report does not read as though only the last line were at fault.
|
|
170
|
+
* @param {Token[]} [commentGroup] The comments which the fixer would
|
|
171
|
+
* convert. Defaults to just `comment`.
|
|
170
172
|
*/
|
|
171
|
-
const reportings = (comment, node, addComment, ctxts, locComment
|
|
172
|
-
|
|
173
|
+
const reportings = (comment, node, addComment, ctxts, locComment, commentGroup = [
|
|
174
|
+
/** @type {Token} */ (comment),
|
|
175
|
+
]) => {
|
|
176
|
+
// A `*/` inside a comment's text would end the generated JSDoc block
|
|
177
|
+
// early, so leave such comments for the user to convert
|
|
178
|
+
const fixer = commentGroup.some(({
|
|
179
|
+
value,
|
|
180
|
+
}) => {
|
|
181
|
+
return value.includes('*/');
|
|
182
|
+
}) ?
|
|
183
|
+
null :
|
|
184
|
+
getFixer(node, comment, addComment, ctxts);
|
|
173
185
|
|
|
174
186
|
if (comment.type === 'Block') {
|
|
175
187
|
if (lineOrBlockStyle === 'line') {
|
|
@@ -310,7 +322,7 @@ export default {
|
|
|
310
322
|
);
|
|
311
323
|
};
|
|
312
324
|
|
|
313
|
-
reportings(comment, node, addComment, contexts, commentGroup[0]);
|
|
325
|
+
reportings(comment, node, addComment, contexts, commentGroup[0], commentGroup);
|
|
314
326
|
};
|
|
315
327
|
|
|
316
328
|
/**
|
|
@@ -715,10 +715,12 @@ export default {
|
|
|
715
715
|
} = contxt;
|
|
716
716
|
return ctxt === node.type;
|
|
717
717
|
})) || {};
|
|
718
|
+
// Use the line break of the source for the generated block
|
|
719
|
+
const lineBreak = sourceCode.text.includes('\r\n') ? '\r\n' : '\n';
|
|
718
720
|
const insertion = (inlineCommentBlock ?
|
|
719
721
|
`/** ${fixerMessage}` :
|
|
720
|
-
|
|
721
|
-
`*/${
|
|
722
|
+
`/**${lineBreak}${indent}*${fixerMessage}${lineBreak}${indent}`) +
|
|
723
|
+
`*/${lineBreak.repeat(lines)}${indent.slice(0, -1)}`;
|
|
722
724
|
|
|
723
725
|
return fixer.insertTextBefore(
|
|
724
726
|
/** @type {import('eslint').Rule.Node} */
|
package/src/rules/tagLines.js
CHANGED
|
@@ -52,6 +52,7 @@ const checkMaxBlockLines = ({
|
|
|
52
52
|
tokens: seedTokens({
|
|
53
53
|
...info,
|
|
54
54
|
description: desc,
|
|
55
|
+
lineEnd: utils.newLineEnd,
|
|
55
56
|
postDelimiter: newPostDelims[idx],
|
|
56
57
|
}),
|
|
57
58
|
};
|
|
@@ -327,6 +328,7 @@ export default iterateJsdoc(({
|
|
|
327
328
|
tokens: seedTokens({
|
|
328
329
|
...info,
|
|
329
330
|
description: desc,
|
|
331
|
+
lineEnd: utils.newLineEnd,
|
|
330
332
|
postDelimiter: postDelims[idx],
|
|
331
333
|
}),
|
|
332
334
|
};
|
|
@@ -356,6 +358,7 @@ export default iterateJsdoc(({
|
|
|
356
358
|
tokens: seedTokens({
|
|
357
359
|
...info,
|
|
358
360
|
description: desc,
|
|
361
|
+
lineEnd: utils.newLineEnd,
|
|
359
362
|
postDelimiter: desc.trim() ? postDelims[idx] : '',
|
|
360
363
|
}),
|
|
361
364
|
};
|