You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(require-next-type, require-throws-type, require-yields-type): adds new rules and adds to recommended and required configs; fixes#1461
BREAKING CHANGE:
It is unlikely to affect users but when using the jsdoc constructor with a recommended config , this commit removes `throws` and `yields`
from the `structuredTags` settings recently added to the config output to require types for these tags in favor of the herein added equivalent
recommended rules. (`next` is still part of `structuredTags` output, however, because this setting ensures the non-standard next tag is treated
as allowable without need for separate configuration.)
Also:
- chore: remove unused linting directives
|||[require-file-overview](./docs/rules/require-file-overview.md#readme)|By default, requires a single `@file` tag at the beginning of each linted file|
420
410
||:wrench:|[require-hyphen-before-param-description](./docs/rules/require-hyphen-before-param-description.md#readme)|Requires a hyphen before `@param` descriptions (and optionally before `@property` descriptions)|
421
411
|:heavy_check_mark:|:wrench:|[require-jsdoc](./docs/rules/require-jsdoc.md#readme)|Checks for presence of jsdoc comments, on functions and potentially other contexts (optionally limited to exports).|
412
+
|:heavy_check_mark:||[require-next-type](./docs/rules/require-next-type.md#readme)|Requires a type on the (non-standard) `@next` tag.|
422
413
|:heavy_check_mark:|:wrench:|[require-param](./docs/rules/require-param.md#readme)|Requires that all function parameters are documented with a `@param` tag.|
423
414
|:heavy_check_mark:||[require-param-description](./docs/rules/require-param-description.md#readme)|Requires that each `@param` tag has a `description` value.|
424
415
|:heavy_check_mark:||[require-param-name](./docs/rules/require-param-name.md#readme)|Requires that all `@param` tags have names.|
|:heavy_check_mark: (off in TS)||[require-returns-type](./docs/rules/require-returns-type.md#readme)|Requires that `@returns` tag has a type value (in curly brackets).|
434
425
|||[require-template](./docs/rules/require-template.md#readme)| Requires `@template` tags be present when type parameters are used.|
435
426
|||[require-throws](./docs/rules/require-throws.md#readme)|Requires that throw statements are documented|
427
+
|:heavy_check_mark:||[require-throws-type](./docs/rules/require-throws-type.md#readme)|Requires a type on the `@throws` tag.|
436
428
|:heavy_check_mark:||[require-yields](./docs/rules/require-yields.md#readme)|Requires that yields are documented|
437
429
|:heavy_check_mark:||[require-yields-check](./docs/rules/require-yields-check.md#readme)|Ensures that if a `@yields` is present that a `yield` (or `yield` with a value) is present in the function body (or that if a `@next` is present that there is a `yield` with a return value present)|
430
+
|:heavy_check_mark:||[require-yields-type](./docs/rules/require-yields-type.md#readme)|Requires a type on the `@yields` tag.|
438
431
|||[sort-tags](./docs/rules/sort-tags.md#readme)|Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups|
439
432
|:heavy_check_mark:|:wrench:|[tag-lines](./docs/rules/tag-lines.md#readme)|Enforces lines (or no lines) between tags|
440
433
||:wrench:|[text-escaping](./docs/rules/text-escaping.md#readme)|This rule can auto-escape certain characters that are input within block and tag descriptions|
|||[require-file-overview](./docs/rules/require-file-overview.md#readme)|By default, requires a single `@file` tag at the beginning of each linted file|
457
447
||:wrench:|[require-hyphen-before-param-description](./docs/rules/require-hyphen-before-param-description.md#readme)|Requires a hyphen before `@param` descriptions (and optionally before `@property` descriptions)|
458
448
|:heavy_check_mark:|:wrench:|[require-jsdoc](./docs/rules/require-jsdoc.md#readme)|Checks for presence of jsdoc comments, on functions and potentially other contexts (optionally limited to exports).|
449
+
|:heavy_check_mark:||[require-next-type](./docs/rules/require-next-type.md#readme)|Requires a type on the (non-standard) `@next` tag.|
459
450
|:heavy_check_mark:|:wrench:|[require-param](./docs/rules/require-param.md#readme)|Requires that all function parameters are documented with a `@param` tag.|
460
451
|:heavy_check_mark:||[require-param-description](./docs/rules/require-param-description.md#readme)|Requires that each `@param` tag has a `description` value.|
461
452
|:heavy_check_mark:||[require-param-name](./docs/rules/require-param-name.md#readme)|Requires that all `@param` tags have names.|
|:heavy_check_mark: (off in TS)||[require-returns-type](./docs/rules/require-returns-type.md#readme)|Requires that `@returns` tag has a type value (in curly brackets).|
471
462
|||[require-template](./docs/rules/require-template.md#readme)| Requires `@template` tags be present when type parameters are used.|
472
463
|||[require-throws](./docs/rules/require-throws.md#readme)|Requires that throw statements are documented|
464
+
|:heavy_check_mark:||[require-throws-type](./docs/rules/require-throws-type.md#readme)|Requires a type on the `@throws` tag.|
473
465
|:heavy_check_mark:||[require-yields](./docs/rules/require-yields.md#readme)|Requires that yields are documented|
474
466
|:heavy_check_mark:||[require-yields-check](./docs/rules/require-yields-check.md#readme)|Ensures that if a `@yields` is present that a `yield` (or `yield` with a value) is present in the function body (or that if a `@next` is present that there is a `yield` with a return value present)|
467
+
|:heavy_check_mark:||[require-yields-type](./docs/rules/require-yields-type.md#readme)|Requires a type on the `@yields` tag.|
475
468
|||[sort-tags](./docs/rules/sort-tags.md#readme)|Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups|
476
469
|:heavy_check_mark:|:wrench:|[tag-lines](./docs/rules/tag-lines.md#readme)|Enforces lines (or no lines) between tags|
477
470
||:wrench:|[text-escaping](./docs/rules/text-escaping.md#readme)|This rule can auto-escape certain characters that are input within block and tag descriptions|
0 commit comments