eslint-plugin-jsdoc 60.4.1 → 60.6.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.
Files changed (96) hide show
  1. package/README.md +4 -0
  2. package/dist/cjs/iterateJsdoc.d.ts +5 -0
  3. package/dist/cjs/jsdocUtils.d.ts +19 -2
  4. package/dist/cjs/rules/escapeInlineTags.d.ts +2 -0
  5. package/dist/generateDocs.cjs +5 -6
  6. package/dist/generateDocs.cjs.map +1 -1
  7. package/dist/index-cjs.cjs +14 -1
  8. package/dist/index-cjs.cjs.map +1 -1
  9. package/dist/index-esm.cjs +0 -2
  10. package/dist/index-esm.cjs.map +1 -1
  11. package/dist/index.cjs +14 -3
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/iterateJsdoc.cjs +12 -0
  14. package/dist/iterateJsdoc.cjs.map +1 -1
  15. package/dist/iterateJsdoc.d.ts +5 -0
  16. package/dist/jsdocUtils.cjs +21 -17
  17. package/dist/jsdocUtils.cjs.map +1 -1
  18. package/dist/jsdocUtils.d.ts +19 -2
  19. package/dist/rules/checkLineAlignment.cjs +1 -2
  20. package/dist/rules/checkLineAlignment.cjs.map +1 -1
  21. package/dist/rules/checkTagNames.cjs +16 -0
  22. package/dist/rules/checkTagNames.cjs.map +1 -1
  23. package/dist/rules/convertToJsdocComments.cjs +2 -4
  24. package/dist/rules/convertToJsdocComments.cjs.map +1 -1
  25. package/dist/rules/emptyTags.cjs +1 -2
  26. package/dist/rules/emptyTags.cjs.map +1 -1
  27. package/dist/rules/escapeInlineTags.cjs +149 -0
  28. package/dist/rules/escapeInlineTags.cjs.map +1 -0
  29. package/dist/rules/escapeInlineTags.d.ts +3 -0
  30. package/dist/rules/informativeDocs.cjs +3 -6
  31. package/dist/rules/informativeDocs.cjs.map +1 -1
  32. package/dist/rules/linesBeforeBlock.cjs +4 -8
  33. package/dist/rules/linesBeforeBlock.cjs.map +1 -1
  34. package/dist/rules/matchDescription.cjs +2 -4
  35. package/dist/rules/matchDescription.cjs.map +1 -1
  36. package/dist/rules/matchName.cjs +1 -2
  37. package/dist/rules/matchName.cjs.map +1 -1
  38. package/dist/rules/multilineBlocks.cjs +3 -6
  39. package/dist/rules/multilineBlocks.cjs.map +1 -1
  40. package/dist/rules/noBadBlocks.cjs +1 -2
  41. package/dist/rules/noBadBlocks.cjs.map +1 -1
  42. package/dist/rules/noTypes.cjs +1 -2
  43. package/dist/rules/noTypes.cjs.map +1 -1
  44. package/dist/rules/noUndefinedTypes.cjs +1 -1
  45. package/dist/rules/noUndefinedTypes.cjs.map +1 -1
  46. package/dist/rules/requireAsteriskPrefix.cjs +1 -2
  47. package/dist/rules/requireAsteriskPrefix.cjs.map +1 -1
  48. package/dist/rules/requireDescriptionCompleteSentence.cjs +1 -2
  49. package/dist/rules/requireDescriptionCompleteSentence.cjs.map +1 -1
  50. package/dist/rules/requireFileOverview.cjs +1 -3
  51. package/dist/rules/requireFileOverview.cjs.map +1 -1
  52. package/dist/rules/requireHyphenBeforeParamDescription.cjs +1 -2
  53. package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +1 -1
  54. package/dist/rules/requireJsdoc.cjs +3 -6
  55. package/dist/rules/requireJsdoc.cjs.map +1 -1
  56. package/dist/rules/requireParam.cjs +6 -12
  57. package/dist/rules/requireParam.cjs.map +1 -1
  58. package/dist/rules/requireParamName.cjs +1 -2
  59. package/dist/rules/requireParamName.cjs.map +1 -1
  60. package/dist/rules/requireReturns.cjs +1 -2
  61. package/dist/rules/requireReturns.cjs.map +1 -1
  62. package/dist/rules/requireTemplate.cjs +1 -2
  63. package/dist/rules/requireTemplate.cjs.map +1 -1
  64. package/dist/rules/sortTags.cjs +1 -2
  65. package/dist/rules/sortTags.cjs.map +1 -1
  66. package/dist/rules.d.ts +34 -37
  67. package/package.json +11 -11
  68. package/src/index-cjs.js +16 -0
  69. package/src/index-esm.js +0 -2
  70. package/src/index.js +16 -2
  71. package/src/iterateJsdoc.js +13 -0
  72. package/src/jsdocUtils.js +22 -17
  73. package/src/rules/checkLineAlignment.js +1 -2
  74. package/src/rules/checkTagNames.js +19 -0
  75. package/src/rules/convertToJsdocComments.js +2 -4
  76. package/src/rules/emptyTags.js +1 -2
  77. package/src/rules/escapeInlineTags.js +189 -0
  78. package/src/rules/informativeDocs.js +3 -6
  79. package/src/rules/linesBeforeBlock.js +4 -8
  80. package/src/rules/matchDescription.js +2 -4
  81. package/src/rules/matchName.js +1 -2
  82. package/src/rules/multilineBlocks.js +3 -6
  83. package/src/rules/noBadBlocks.js +1 -2
  84. package/src/rules/noTypes.js +1 -2
  85. package/src/rules/noUndefinedTypes.js +7 -1
  86. package/src/rules/requireAsteriskPrefix.js +1 -2
  87. package/src/rules/requireDescriptionCompleteSentence.js +1 -2
  88. package/src/rules/requireFileOverview.js +1 -3
  89. package/src/rules/requireHyphenBeforeParamDescription.js +1 -2
  90. package/src/rules/requireJsdoc.js +3 -6
  91. package/src/rules/requireParam.js +6 -12
  92. package/src/rules/requireParamName.js +1 -2
  93. package/src/rules/requireReturns.js +1 -2
  94. package/src/rules/requireTemplate.js +1 -2
  95. package/src/rules/sortTags.js +1 -2
  96. package/src/rules.d.ts +34 -37
@@ -75,11 +75,15 @@ export default iterateJsdoc(({
75
75
  * @type {{
76
76
  * definedTags: string[],
77
77
  * enableFixer: boolean,
78
+ * inlineTags: string[],
78
79
  * jsxTags: boolean,
79
80
  * typed: boolean
80
81
  }} */ {
81
82
  definedTags = [],
82
83
  enableFixer = true,
84
+ inlineTags = [
85
+ 'link', 'linkcode', 'linkplain', 'tutorial',
86
+ ],
83
87
  jsxTags,
84
88
  typed,
85
89
  } = context.options[0] || {};
@@ -278,6 +282,12 @@ export default iterateJsdoc(({
278
282
  report(`Invalid JSDoc tag name "${tagName}".`, null, jsdocTag);
279
283
  }
280
284
  }
285
+
286
+ for (const inlineTag of utils.getInlineTags()) {
287
+ if (!inlineTags.includes(inlineTag.tag)) {
288
+ report(`Invalid JSDoc inline tag name "${inlineTag.tag}"`, null, inlineTag);
289
+ }
290
+ }
281
291
  }, {
282
292
  iterateAllJsdocs: true,
283
293
  meta: {
@@ -308,6 +318,15 @@ The format is as follows:
308
318
  description: 'Set to `false` to disable auto-removal of types that are redundant with the [`typed` option](#typed).',
309
319
  type: 'boolean',
310
320
  },
321
+ inlineTags: {
322
+ description: `List of tags to allow inline.
323
+
324
+ Defaults to array of \`'link', 'linkcode', 'linkplain', 'tutorial'\``,
325
+ items: {
326
+ type: 'string',
327
+ },
328
+ type: 'array',
329
+ },
311
330
  jsxTags: {
312
331
  description: `If this is set to \`true\`, all of the following tags used to control JSX output are allowed:
313
332
 
@@ -319,8 +319,7 @@ Supplying your own value overrides the defaults.`,
319
319
  Can either be strings or an object with a \`context\` string and an optional, default \`false\` \`inlineCommentBlock\` boolean.
320
320
 
321
321
  Defaults to \`ArrowFunctionExpression\`, \`FunctionDeclaration\`,
322
- \`FunctionExpression\`, \`TSDeclareFunction\`.
323
- `,
322
+ \`FunctionExpression\`, \`TSDeclareFunction\`.`,
324
323
  items: {
325
324
  anyOf: [
326
325
  {
@@ -417,8 +416,7 @@ be converted to \`multi\` style JSDoc comments.)
417
416
  /** Some text */
418
417
  \`\`\`
419
418
 
420
- Defaults to \`multi\`.
421
- `,
419
+ Defaults to \`multi\`.`,
422
420
  enum: [
423
421
  'multi', 'single',
424
422
  ],
@@ -91,8 +91,7 @@ add them within this option.
91
91
  {
92
92
  'jsdoc/empty-tags': ['error', {tags: ['event']}]
93
93
  }
94
- \`\`\`
95
- `,
94
+ \`\`\``,
96
95
  items: {
97
96
  type: 'string',
98
97
  },
@@ -0,0 +1,189 @@
1
+ import iterateJsdoc from '../iterateJsdoc.js';
2
+
3
+ export default iterateJsdoc(({
4
+ context,
5
+ jsdoc,
6
+ settings,
7
+ utils,
8
+ }) => {
9
+ const {
10
+ mode,
11
+ } = settings;
12
+
13
+ if (mode !== 'typescript') {
14
+ return;
15
+ }
16
+
17
+ const {
18
+ allowedInlineTags = [],
19
+ enableFixer = false,
20
+ fixType = 'backslash',
21
+ } = context.options[0] || {};
22
+
23
+ const {
24
+ description,
25
+ } = utils.getDescription();
26
+
27
+ /** @type {string[]} */
28
+ const tagNames = [];
29
+
30
+ /** @type {number[]} */
31
+ const indexes = [];
32
+
33
+ const unescapedInlineTagRegex = /(?:^|\s)@(\w+)/gv;
34
+ for (const [
35
+ idx,
36
+ descLine,
37
+ ] of (
38
+ description.startsWith('\n') ? description.slice(1) : description
39
+ ).split('\n').entries()
40
+ ) {
41
+ descLine.replaceAll(unescapedInlineTagRegex, (_, tagName) => {
42
+ if (allowedInlineTags.includes(tagName)) {
43
+ return _;
44
+ }
45
+
46
+ tagNames.push(tagName);
47
+ indexes.push(idx);
48
+
49
+ return _;
50
+ });
51
+ }
52
+
53
+ for (const [
54
+ idx,
55
+ tagName,
56
+ ] of tagNames.entries()) {
57
+ utils.reportJSDoc(
58
+ `Unexpected inline JSDoc tag. Did you mean to use {@${tagName}}, \\@${tagName}, or \`@${tagName}\`?`,
59
+ {
60
+ line: indexes[idx] + 1,
61
+ },
62
+ enableFixer ?
63
+ () => {
64
+ utils.setBlockDescription((info, seedTokens, descLines) => {
65
+ return descLines.map((desc) => {
66
+ const newDesc = desc.replaceAll(
67
+ new RegExp(`(^|\\s)@${
68
+ // No need to escape, as contains only safe characters
69
+ tagName
70
+ }`, 'gv'),
71
+ fixType === 'backticks' ? '$1`@' + tagName + '`' : '$1\\@' + tagName,
72
+ );
73
+
74
+ return {
75
+ number: 0,
76
+ source: '',
77
+ tokens: seedTokens({
78
+ ...info,
79
+ description: newDesc,
80
+ postDelimiter: newDesc.trim() ? ' ' : '',
81
+ }),
82
+ };
83
+ });
84
+ });
85
+ } :
86
+ null,
87
+ );
88
+ }
89
+
90
+ /**
91
+ * @param {string} tagName
92
+ * @returns {[
93
+ * RegExp,
94
+ * (description: string) => string
95
+ * ]}
96
+ */
97
+ const escapeInlineTags = (tagName) => {
98
+ const regex = new RegExp(`(^|\\s)@${
99
+ // No need to escape, as contains only safe characters
100
+ tagName
101
+ }`, 'gv');
102
+
103
+ return [
104
+ regex,
105
+ /**
106
+ * @param {string} desc
107
+ */
108
+ (desc) => {
109
+ return desc.replaceAll(
110
+ regex,
111
+ fixType === 'backticks' ? '$1`@' + tagName + '`' : '$1\\@' + tagName,
112
+ );
113
+ },
114
+ ];
115
+ };
116
+
117
+ for (const tag of jsdoc.tags) {
118
+ if (tag.tag === 'example') {
119
+ continue;
120
+ }
121
+
122
+ /** @type {string} */
123
+ let tagName = '';
124
+ while (/** @type {string[]} */ (
125
+ utils.getTagDescription(tag, true)
126
+ // eslint-disable-next-line no-loop-func -- Safe
127
+ ).some((desc) => {
128
+ tagName = unescapedInlineTagRegex.exec(desc)?.[1] ?? '';
129
+ if (allowedInlineTags.includes(tagName)) {
130
+ return false;
131
+ }
132
+
133
+ return tagName;
134
+ })) {
135
+ const line = utils.setTagDescription(tag, ...escapeInlineTags(tagName)) +
136
+ tag.source[0].number;
137
+ utils.reportJSDoc(
138
+ `Unexpected inline JSDoc tag. Did you mean to use {@${tagName}}, \\@${tagName}, or \`@${tagName}\`?`,
139
+ {
140
+ line,
141
+ },
142
+ enableFixer ? () => {} : null,
143
+ true,
144
+ );
145
+ }
146
+ }
147
+ }, {
148
+ iterateAllJsdocs: true,
149
+ meta: {
150
+ docs: {
151
+ description: 'Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode).',
152
+ url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/escape-inline-tags.md#repos-sticky-header',
153
+ },
154
+ fixable: 'code',
155
+ schema: [
156
+ {
157
+ additionalProperties: false,
158
+ properties: {
159
+ allowedInlineTags: {
160
+ description: 'A listing of tags you wish to allow unescaped. Defaults to an empty array.',
161
+ items: {
162
+ type: 'string',
163
+ },
164
+ type: 'array',
165
+ },
166
+ enableFixer: {
167
+ description: 'Whether to enable the fixer. Defaults to `false`.',
168
+ type: 'boolean',
169
+ },
170
+ fixType: {
171
+ description: `How to escape the inline tag.
172
+
173
+ May be "backticks" to enclose tags in backticks (treating as code segments), or
174
+ "backslash" to escape tags with a backslash, i.e., \`\\@\`
175
+
176
+ Defaults to "backslash".`,
177
+ enum: [
178
+ 'backticks',
179
+ 'backslash',
180
+ ],
181
+ type: 'string',
182
+ },
183
+ },
184
+ type: 'object',
185
+ },
186
+ ],
187
+ type: 'suggestion',
188
+ },
189
+ });
@@ -171,8 +171,7 @@ The default \`aliases\` option is:
171
171
  {
172
172
  "a": ["an", "our"]
173
173
  }
174
- \`\`\`
175
- `,
174
+ \`\`\``,
176
175
  patternProperties: {
177
176
  '.*': {
178
177
  items: {
@@ -194,8 +193,7 @@ function computeTypes(node) {
194
193
  }
195
194
  \`\`\`
196
195
 
197
- No tags are excluded by default.
198
- `,
196
+ No tags are excluded by default.`,
199
197
  items: {
200
198
  type: 'string',
201
199
  },
@@ -215,8 +213,7 @@ The default \`uselessWords\` option is:
215
213
 
216
214
  \`\`\`json
217
215
  ["a", "an", "i", "in", "of", "s", "the"]
218
- \`\`\`
219
- `,
216
+ \`\`\``,
220
217
  items: {
221
218
  type: 'string',
222
219
  },
@@ -109,15 +109,13 @@ export default iterateJsdoc(({
109
109
  properties: {
110
110
  checkBlockStarts: {
111
111
  description: `Whether to additionally check the start of blocks, such as classes or functions.
112
- Defaults to \`false\`.
113
- `,
112
+ Defaults to \`false\`.`,
114
113
  type: 'boolean',
115
114
  },
116
115
  excludedTags: {
117
116
  description: `An array of tags whose presence in the JSDoc block will prevent the
118
117
  application of the rule. Defaults to \`['type']\` (i.e., if \`@type\` is present,
119
- lines before the block will not be added).
120
- `,
118
+ lines before the block will not be added).`,
121
119
  items: {
122
120
  type: 'string',
123
121
  },
@@ -125,14 +123,12 @@ lines before the block will not be added).
125
123
  },
126
124
  ignoreSameLine: {
127
125
  description: `This option excludes cases where the JSDoc block occurs on the same line as a
128
- preceding code or comment. Defaults to \`true\`.
129
- `,
126
+ preceding code or comment. Defaults to \`true\`.`,
130
127
  type: 'boolean',
131
128
  },
132
129
  ignoreSingleLines: {
133
130
  description: `This option excludes cases where the JSDoc block is only one line long.
134
- Defaults to \`true\`.
135
- `,
131
+ Defaults to \`true\`.`,
136
132
  type: 'boolean',
137
133
  },
138
134
  lines: {
@@ -184,8 +184,7 @@ Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclarati
184
184
  JSDoc block throughout your files.
185
185
 
186
186
  See the ["AST and Selectors"](../#advanced-ast-and-selectors)
187
- section of our Advanced docs for more on the expected format.
188
- `,
187
+ section of our Advanced docs for more on the expected format.`,
189
188
  items: {
190
189
  anyOf: [
191
190
  {
@@ -302,8 +301,7 @@ literal, e.g., \`/[A-Z].*\\./vi\`.
302
301
  \`\`\`
303
302
 
304
303
  This can be overridden per tag or for the main block description by setting
305
- \`message\` within \`tags\` or \`mainDescription\`, respectively.
306
- `,
304
+ \`message\` within \`tags\` or \`mainDescription\`, respectively.`,
307
305
  type: 'string',
308
306
  },
309
307
  nonemptyTags: {
@@ -118,8 +118,7 @@ fixes found by the likes of \`disallowName\` even when a different tag has the
118
118
  disallowed name. An alternative is to ensure that \`comment\` finds the specific
119
119
  tag of the desired tag and/or name and no \`disallowName\` (or \`allowName\`) is
120
120
  supplied. In such a case, only one error will be reported, but no fixer will
121
- be applied, however.
122
- `,
121
+ be applied, however.`,
123
122
  items: {
124
123
  additionalProperties: false,
125
124
  properties: {
@@ -494,8 +494,7 @@ such a tag will cause multiline blocks to be allowed.
494
494
  You may set this to an empty array to prevent any tag from permitting multiple
495
495
  lines.
496
496
 
497
- Defaults to \`['*']\`.
498
- `,
497
+ Defaults to \`['*']\`.`,
499
498
  },
500
499
  noFinalLineText: {
501
500
  description: `For multiline blocks, any non-whitespace text preceding the \`*/\` on the final
@@ -518,8 +517,7 @@ Defaults to \`false\`.`,
518
517
  description: `If this is \`true\`, any single line blocks will be reported, except those which
519
518
  are whitelisted in \`singleLineTags\`.
520
519
 
521
- Defaults to \`false\`.
522
- `,
520
+ Defaults to \`false\`.`,
523
521
  type: 'boolean',
524
522
  },
525
523
  noZeroLineText: {
@@ -539,8 +537,7 @@ for such cases. Blocks are not reported which have multi-line descriptions,
539
537
  multiple tags, a block description and tag, or tags with multi-line types or
540
538
  descriptions.
541
539
 
542
- Defaults to \`null\`.
543
- `,
540
+ Defaults to \`null\`.`,
544
541
  type: 'number',
545
542
  },
546
543
  singleLineTags: {
@@ -106,8 +106,7 @@ export default iterateJsdoc(({
106
106
  a multi-comment block and at-sign \`/* @\`.
107
107
 
108
108
  Defaults to \`['ts-check', 'ts-expect-error', 'ts-ignore', 'ts-nocheck']\`
109
- (some directives [used by TypeScript](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check)).
110
- `,
109
+ (some directives [used by TypeScript](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check)).`,
111
110
  items: {
112
111
  type: 'string',
113
112
  },
@@ -77,8 +77,7 @@ expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
77
77
  \`@method\`) (including those associated with an \`@interface\`).
78
78
 
79
79
  See the ["AST and Selectors"](../#advanced-ast-and-selectors)
80
- section of our Advanced docs for more on the expected format.
81
- `,
80
+ section of our Advanced docs for more on the expected format.`,
82
81
  items: {
83
82
  anyOf: [
84
83
  {
@@ -139,7 +139,13 @@ export default iterateJsdoc(({
139
139
  return doc.tags.filter(({
140
140
  tag,
141
141
  }) => {
142
- return utils.isNamepathDefiningTag(tag);
142
+ return utils.isNamepathDefiningTag(tag) && ![
143
+ 'arg',
144
+ 'argument',
145
+ 'param',
146
+ 'prop',
147
+ 'property',
148
+ ].includes(tag);
143
149
  });
144
150
  });
145
151
 
@@ -180,8 +180,7 @@ which applies to the main JSDoc block description.
180
180
  }
181
181
  }]
182
182
  }
183
- \`\`\`
184
- `,
183
+ \`\`\``,
185
184
  properties: {
186
185
  always: {
187
186
  description: `If it is \`"always"\` then a problem is raised when there is no asterisk
@@ -346,8 +346,7 @@ All other tags will treat the text following the tag name, a space, and
346
346
  an optional curly-bracketed type expression (and another space) as part of
347
347
  its "description" (e.g., for \`@returns {someType} some description\`, the
348
348
  description is \`some description\` while for \`@some-tag xyz\`, the description
349
- is \`xyz\`).
350
- `,
349
+ is \`xyz\`).`,
351
350
  items: {
352
351
  type: 'string',
353
352
  },
@@ -176,9 +176,7 @@ have a way to allow multiple licenses for the whole page by using the SPDX
176
176
  Note that the tag names are the main JSDoc tag name, so you should use \`file\`
177
177
  in this configuration object regardless of whether you have configured
178
178
  \`fileoverview\` instead of \`file\` on \`tagNamePreference\` (i.e., \`fileoverview\`
179
- will be checked, but you must use \`file\` on the configuration object).
180
-
181
- `,
179
+ will be checked, but you must use \`file\` on the configuration object).`,
182
180
  patternProperties: {
183
181
  '.*': {
184
182
  additionalProperties: false,
@@ -199,8 +199,7 @@ other tags besides the \`@param\` tag (or the \`@arg\` tag if so set).`,
199
199
  to ensure \`@property\` never uses hyphens. A key can also be set as \`*\`, e.g.,
200
200
  \`'*': 'always'\` to apply hyphen checking to any tag (besides the preferred
201
201
  \`@param\` tag which follows the main string option setting and besides any
202
- other \`tags\` entries).
203
- `,
202
+ other \`tags\` entries).`,
204
203
  },
205
204
  },
206
205
  type: 'object',
@@ -60,8 +60,7 @@ no parameters or return values are found.`,
60
60
  boolean, this option can be set to the string \`"no-setter"\` to indicate that
61
61
  getters should be checked but only when there is no setter. This may be useful
62
62
  if one only wishes documentation on one of the two accessors. Defaults to
63
- \`false\`.
64
- `,
63
+ \`false\`.`,
65
64
  },
66
65
  checkSetters: {
67
66
  anyOf: [
@@ -143,8 +142,7 @@ Defaults to \`true\`.`,
143
142
  functions/methods with no parameters or return values (intended where
144
143
  function/method names are sufficient for themselves as documentation).
145
144
 
146
- Defaults to \`false\`.
147
- `,
145
+ Defaults to \`false\`.`,
148
146
  type: 'boolean',
149
147
  },
150
148
  exemptOverloadedImplementations: {
@@ -178,8 +176,7 @@ otherwise noted):
178
176
  - \`ancestorsOnly\` - Optimization to only check node ancestors to check if node is exported
179
177
  - \`esm\` - ESM exports are checked for JSDoc comments (Defaults to \`true\`)
180
178
  - \`cjs\` - CommonJS exports are checked for JSDoc comments (Defaults to \`true\`)
181
- - \`window\` - Window global exports are checked for JSDoc comments
182
- `,
179
+ - \`window\` - Window global exports are checked for JSDoc comments`,
183
180
  oneOf: [
184
181
  {
185
182
  default: false,
@@ -548,15 +548,13 @@ export default iterateJsdoc(({
548
548
  autoIncrementBase: {
549
549
  default: 0,
550
550
  description: `Numeric to indicate the number at which to begin auto-incrementing roots.
551
- Defaults to \`0\`.
552
- `,
551
+ Defaults to \`0\`.`,
553
552
  type: 'integer',
554
553
  },
555
554
  checkConstructors: {
556
555
  default: true,
557
556
  description: `A value indicating whether \`constructor\`s should be checked. Defaults to
558
- \`true\`.
559
- `,
557
+ \`true\`.`,
560
558
  type: 'boolean',
561
559
  },
562
560
  checkDestructured: {
@@ -574,8 +572,7 @@ the \`{a, b}\` object parameter).
574
572
  If \`checkDestructuredRoots\` is \`false\`, \`checkDestructured\` will also be
575
573
  implied to be \`false\` (i.e., the inside of the roots will not be checked
576
574
  either, e.g., it will also not complain if \`a\` or \`b\` do not have their own
577
- documentation). Defaults to \`true\`.
578
- `,
575
+ documentation). Defaults to \`true\`.`,
579
576
  type: 'boolean',
580
577
  },
581
578
  checkGetters: {
@@ -634,8 +631,7 @@ Nor will this:
634
631
  */
635
632
  function quux ({num, ...extra}) {
636
633
  }
637
- \`\`\`
638
- `,
634
+ \`\`\``,
639
635
  type: 'boolean',
640
636
  },
641
637
  checkSetters: {
@@ -689,8 +685,7 @@ Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclarati
689
685
  which are checked.
690
686
 
691
687
  See the ["AST and Selectors"](../#advanced-ast-and-selectors)
692
- section of our Advanced docs for more on the expected format.
693
- `,
688
+ section of our Advanced docs for more on the expected format.`,
694
689
  items: {
695
690
  anyOf: [
696
691
  {
@@ -749,8 +744,7 @@ function baar ([a, ...extra]) {
749
744
  Note that the type \`any\` is included since we don't know of any specific
750
745
  type to use.
751
746
 
752
- Defaults to \`true\`.
753
- `,
747
+ Defaults to \`true\`.`,
754
748
  type: 'boolean',
755
749
  },
756
750
  enableRootFixer: {
@@ -38,8 +38,7 @@ expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
38
38
  \`@method\`) (including those associated with an \`@interface\`).
39
39
 
40
40
  See the ["AST and Selectors"](../#advanced-ast-and-selectors)
41
- section of our Advanced docs for more on the expected format.
42
- `,
41
+ section of our Advanced docs for more on the expected format.`,
43
42
  items: {
44
43
  anyOf: [
45
44
  {
@@ -254,8 +254,7 @@ otherwise noted):
254
254
  - \`ancestorsOnly\` - Optimization to only check node ancestors to check if node is exported
255
255
  - \`esm\` - ESM exports are checked for \`@returns\` JSDoc comments (Defaults to \`true\`)
256
256
  - \`cjs\` - CommonJS exports are checked for \`@returns\` JSDoc comments (Defaults to \`true\`)
257
- - \`window\` - Window global exports are checked for \`@returns\` JSDoc comments
258
- `,
257
+ - \`window\` - Window global exports are checked for \`@returns\` JSDoc comments`,
259
258
  oneOf: [
260
259
  {
261
260
  default: false,
@@ -214,8 +214,7 @@ templates of this format:
214
214
  */
215
215
  \`\`\`
216
216
 
217
- Defaults to \`false\`.
218
- `,
217
+ Defaults to \`false\`.`,
219
218
  type: 'boolean',
220
219
  },
221
220
  },
@@ -729,8 +729,7 @@ a fixed order that doesn't change into the future, supply your own
729
729
  'deprecated',
730
730
  'todo',
731
731
  ]}];
732
- \`\`\`
733
- `,
732
+ \`\`\``,
734
733
  items: {
735
734
  additionalProperties: false,
736
735
  properties: {