Skip to content

Commit

Permalink
fix: ensure all rules marked with recommended status; add table prope…
Browse files Browse the repository at this point in the history
…rty for recommended status; fixes #652
  • Loading branch information
brettz9 committed Oct 31, 2020
1 parent 122a9b5 commit 4e699c4
Show file tree
Hide file tree
Showing 41 changed files with 106 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .README/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,39 @@ Finally, enable all of the rules that you would like to use.
```javascript
{
"rules": {
"jsdoc/check-access": 1, // Recommended
"jsdoc/check-alignment": 1, // Recommended
"jsdoc/check-examples": 1,
"jsdoc/check-indentation": 1,
"jsdoc/check-line-alignment": 1,
"jsdoc/check-param-names": 1, // Recommended
"jsdoc/check-property-names": 1, // Recommended
"jsdoc/check-syntax": 1,
"jsdoc/check-tag-names": 1, // Recommended
"jsdoc/check-types": 1, // Recommended
"jsdoc/check-values": 1, // Recommended
"jsdoc/empty-tags": 1, // Recommended
"jsdoc/implements-on-classes": 1, // Recommended
"jsdoc/match-description": 1,
"jsdoc/newline-after-description": 1, // Recommended
"jsdoc/no-bad-blocks": 1,
"jsdoc/no-defaults": 1,
"jsdoc/no-types": 1,
"jsdoc/no-undefined-types": 1, // Recommended
"jsdoc/require-description": 1,
"jsdoc/require-description-complete-sentence": 1,
"jsdoc/require-example": 1,
"jsdoc/require-file-overview": 1,
"jsdoc/require-hyphen-before-param-description": 1,
"jsdoc/require-jsdoc": 1, // Recommended
"jsdoc/require-param": 1, // Recommended
"jsdoc/require-param-description": 1, // Recommended
"jsdoc/require-param-name": 1, // Recommended
"jsdoc/require-param-type": 1, // Recommended
"jsdoc/require-property": 1, // Recommended
"jsdoc/require-property-description": 1, // Recommended
"jsdoc/require-property-name": 1, // Recommended
"jsdoc/require-property-type": 1, // Recommended
"jsdoc/require-returns": 1, // Recommended
"jsdoc/require-returns-check": 1, // Recommended
"jsdoc/require-returns-description": 1, // Recommended
Expand Down
1 change: 1 addition & 0 deletions .README/rules/check-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Also reports:
|---|---|
|Context|everywhere|
|Tags|`@access`|
|Recommended|false|
|Settings||
|Options||

Expand Down
1 change: 1 addition & 0 deletions .README/rules/check-alignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Reports invalid alignment of JSDoc block asterisks.
|---|---|
|Context|everywhere|
|Tags|N/A|
|Recommended|true|

<!-- assertions checkAlignment -->
1 change: 1 addition & 0 deletions .README/rules/check-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ expression-oriented rules will be used by default as well:
|---|---|
|Context|everywhere|
|Tags|`example`|
|Recommended|false|
|Options| *See above* |

<!-- assertions checkExamples -->
1 change: 1 addition & 0 deletions .README/rules/check-indentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ report a padding issue:
|---|---|
|Context|everywhere|
|Tags|N/A|
|Recommended|false|
|Options| `excludeTags` |

<!-- assertions checkIndentation -->
1 change: 1 addition & 0 deletions .README/rules/check-line-alignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ line's parts. **Only the non-default `"always"` is implemented for now.**
|Options|(a string matching `"always"|"never"`)|
|Tags|`param`, `property`|
|Aliases|`arg`, `argument`, `prop`|
|Recommended|false|

<!-- assertions checkLineAlignment -->
1 change: 1 addition & 0 deletions .README/rules/check-param-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ Whether to check destructured properties. Defaults to `true`.
|Options|`allowExtraTrailingParamDocs`, `checkDestructured`, `checkRestProperty`, `checkTypesPattern`|
|Tags|`param`|
|Aliases|`arg`, `argument`|
|Recommended|true|
<!-- assertions checkParamNames -->
1 change: 1 addition & 0 deletions .README/rules/check-property-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ be removed even if it has a different type or description).
|Options|`enableFixer`|
|Tags|`property`|
|Aliases|`prop`|
|Recommended|true|

<!-- assertions checkPropertyNames -->
1 change: 1 addition & 0 deletions .README/rules/check-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ rule is enforced (except under "permissive" and "closure" modes).
|---|---|
|Context|everywhere|
|Tags|N/A|
|Recommended|false|

<!-- assertions checkSyntax -->
1 change: 1 addition & 0 deletions .README/rules/check-tag-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ The format is as follows:
|---|---|
|Context|everywhere|
|Tags|N/A|
|Recommended|true|
|Options|`definedTags`|
|Settings|`tagNamePreference`, `mode`|

Expand Down
1 change: 1 addition & 0 deletions .README/rules/check-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ for types, you can use `settings.jsdoc.structuredTags` with a tag `type` of
|Tags|`augments`, `class`, `constant`, `enum`, `implements`, `member`, `module`, `namespace`, `param`, `property`, `returns`, `throws`, `type`, `typedef`, `yields`|
|Aliases|`constructor`, `const`, `extends`, `var`, `arg`, `argument`, `prop`, `return`, `exception`, `yield`|
|Closure-only|`package`, `private`, `protected`, `public`, `static`|
|Recommended|true|
|Options|`noDefaults`, `exemptTagContexts`, `unifyParentAndChildTypeChecks`|
|Settings|`preferredTypes`, `mode`, `structuredTags`|

Expand Down
1 change: 1 addition & 0 deletions .README/rules/check-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ is expected before any line breaks.
|---|---|
|Context|everywhere|
|Tags|`@version`, `@since`, `@license`, `@author`|
|Recommended|true|
|Options|`allowedAuthors`, `allowedLicenses`, `licensePattern`|
|Settings|`tagNamePreference`|

Expand Down
1 change: 1 addition & 0 deletions .README/rules/empty-tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ add them within this option.
|---|---|
|Context|everywhere|
|Tags| `abstract`, `async`, `generator`, `global`, `hideconstructor`, `ignore`, `inheritdoc`, `inner`, `instance`, `internal`, `override`, `readonly`, `package`, `private`, `protected`, `public`, `static` and others added by `tags`|
|Recommended|true|
|Options|`tags`|
<!-- assertions emptyTags -->
1 change: 1 addition & 0 deletions .README/rules/implements-on-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ section of our README for more on the expected format.
|---|---|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|`implements` (prevented)|
|Recommended|true|
|Options|`contexts`|

<!-- assertions implementsOnClasses -->
1 change: 1 addition & 0 deletions .README/rules/match-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ section of our README for more on the expected format.
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|docblock and `@description` by default but more with `tags`|
|Aliases|`@desc`|
|Recommended|false|
|Settings||
|Options|`contexts`, `tags` (accepts tags with names and optional type such as 'param', 'arg', 'argument', 'property', and 'prop', and accepts arbitrary list of other tags with an optional type (but without names), e.g., 'returns', 'return'), `mainDescription`, `matchDescription`|

Expand Down
3 changes: 2 additions & 1 deletion .README/rules/newline-after-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ description. The default value is `"always"`.
|||
|---|---|
|Context|everywhere|
|Options|(a string matching `"always"|"never"`)|
|Tags|N/A (doc block)|
|Options|(a string matching `"always"|"never"`)|
|Recommended|true|

<!-- assertions newlineAfterDescription -->
3 changes: 2 additions & 1 deletion .README/rules/no-bad-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Defaults to `['ts-check', 'ts-expect-error', 'ts-ignore', 'ts-nocheck']`
|||
|---|---|
|Context|Everywhere|
|Options|`ignore`|
|Tags|N/A|
|Recommended|false|
|Options|`ignore`|

<!-- assertions noBadBlocks -->
1 change: 1 addition & 0 deletions .README/rules/no-defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ section of our README for more on the expected format.
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|`param`, `default`|
|Aliases|`arg`, `argument`, `defaultvalue`|
|Recommended|false|
|Options|`contexts`, `noOptionalParamNames`|

<!-- assertions noDefaults -->
1 change: 1 addition & 0 deletions .README/rules/no-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ section of our README for more on the expected format.
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|`param`, `returns`|
|Aliases|`arg`, `argument`, `return`|
|Recommended|false|
|Options|`contexts`|

<!-- assertions noTypes -->
1 change: 1 addition & 0 deletions .README/rules/no-undefined-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ An option object may have the following key:
|Tags|`augments`, `class`, `constant`, `enum`, `implements`, `member`, `module`, `namespace`, `param`, `property`, `returns`, `throws`, `type`, `typedef`, `yields`|
|Aliases|`constructor`, `const`, `extends`, `var`, `arg`, `argument`, `prop`, `return`, `exception`, `yield`|
|Closure-only|`package`, `private`, `protected`, `public`, `static`|
|Recommended|true|
|Options|`definedTypes`|
|Settings|`preferredTypes`, `mode`, `structuredTags`|

Expand Down
1 change: 1 addition & 0 deletions .README/rules/require-description-complete-sentence.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ nouns, for example).
|Context|everywhere|
|Tags|doc block, `param`, `returns`, `description`, `property`, `summary`, `file`, `classdesc`, `todo`, `deprecated`, `throws`, 'yields' and others added by `tags`|
|Aliases|`arg`, `argument`, `return`, `desc`, `prop`, `fileoverview`, `overview`, `exception`, `yield`|
|Recommended|false|
|Options|`tags`, `abbreviations`, `newlineBeforeCapsAssumesBadSentenceEnd`|
<!-- assertions requireDescriptionCompleteSentence -->
1 change: 1 addition & 0 deletions .README/rules/require-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ An options object may have any of the following properties:
| Context | `ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled |
| Tags | `description` or jsdoc block |
| Aliases | `desc` |
| Recommended | false |
| Options | `contexts`, `exemptedBy`, `descriptionStyle`, `checkConstructors`, `checkGetters`, `checkSetters` |
| Settings | `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |

Expand Down
1 change: 1 addition & 0 deletions .README/rules/require-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ report a missing example description after this is added.
|---|---|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|`example`|
|Recommended|false|
|Options|`exemptedBy`, `exemptNoArguments`, `avoidExampleOnConstructors`, `contexts`|
|Settings|`overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|

Expand Down
1 change: 1 addition & 0 deletions .README/rules/require-file-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ will be checked, but you must use `file` on the configuration object).
|Context|Everywhere|
|Tags|`file`; others when `tags` set|
|Aliases|`fileoverview`, `overview`|
|Recommended|false|
|Options|`tags`|

<!-- assertions requireFileOverview -->
1 change: 1 addition & 0 deletions .README/rules/require-hyphen-before-param-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ other tags besides the `@param` tag (or the `@arg` tag if so set):
|Context|everywhere|
|Tags|`param` and optionally other tags within `tags`|
|Aliases|`arg`, `argument`; potentially `prop` or other aliases|
|Recommended|false|
|Options|(a string matching `"always"|"never"`) followed by an optional object with a `tags` property|

<!-- assertions requireHyphenBeforeParamDescription -->
1 change: 1 addition & 0 deletions .README/rules/require-jsdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Defaults to `true`.
|---|---|
|Context|`ArrowFunctionExpression`, `ClassDeclaration`, `ClassExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|N/A|
|Recommended|true|
|Options|`publicOnly`, `require`, `contexts`, `exemptEmptyConstructors`, `exemptEmptyFunctions`, `enableFixer`|

<!-- assertions requireJsdoc -->
1 change: 1 addition & 0 deletions .README/rules/require-param-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ section of our README for more on the expected format.
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|`param`|
|Aliases|`arg`, `argument`|
|Recommended|true|
|Options|`contexts`|

<!-- assertions requireParamDescription -->
1 change: 1 addition & 0 deletions .README/rules/require-param-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ section of our README for more on the expected format.
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|`param`|
|Aliases|`arg`, `argument`|
|Recommended|true|
|Options|`contexts`|

<!-- assertions requireParamName -->
1 change: 1 addition & 0 deletions .README/rules/require-param-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ section of our README for more on the expected format.
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|`param`|
|Aliases|`arg`, `argument`|
|Recommended|true|
|Options|`contexts`|

<!-- assertions requireParamType -->
1 change: 1 addition & 0 deletions .README/rules/require-param.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ documentation). Defaults to `true`.
| Context | `ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled |
| Tags | `param` |
| Aliases | `arg`, `argument` |
|Recommended|true|
| Options | `autoIncrementBase`, `checkDestructured`, `checkDestructuredRoots`, `contexts`, `enableFixer`, `enableRootFixer`, `enableRestElementFixer`, `checkRestProperty`, `exemptedBy`, `checkConstructors`, `checkGetters`, `checkSetters`, `checkTypesPattern`, `unnamedRootBase` |
| Settings | `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |

Expand Down
1 change: 1 addition & 0 deletions .README/rules/require-property-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Requires that each `@property` tag has a `description` value.
|Context|everywhere|
|Tags|`property`|
|Aliases|`prop`|
|Recommended|true|

<!-- assertions requirePropertyDescription -->
1 change: 1 addition & 0 deletions .README/rules/require-property-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Requires that all function `@property` tags have names.
|Context|everywhere|
|Tags|`property`|
|Aliases|`prop`|
|Recommended|true|

<!-- assertions requirePropertyName -->
1 change: 1 addition & 0 deletions .README/rules/require-property-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Requires that each `@property` tag has a `type` value.
|Context|everywhere|
|Tags|`property`|
|Aliases|`prop`|
|Recommended|true|

<!-- assertions requirePropertyType -->
1 change: 1 addition & 0 deletions .README/rules/require-property.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ The fixer for `require-property` will add an empty `@property`.
|---|---|
|Context|Everywhere|
|Tags|`typedef`, `namespace`|
|Recommended|true|

<!-- assertions requireProperty -->
1 change: 1 addition & 0 deletions .README/rules/require-returns-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Will also report if multiple `@returns` tags are present.
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
|Tags|`returns`|
|Aliases|`return`|
|Recommended|true|

<!-- assertions requireReturnsCheck -->
1 change: 1 addition & 0 deletions .README/rules/require-returns-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ section of our README for more on the expected format.
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|`returns`|
|Aliases|`return`|
|Recommended|true|
|Options|`contexts`|

<!-- assertions requireReturnsDescription -->
1 change: 1 addition & 0 deletions .README/rules/require-returns-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ section of our README for more on the expected format.
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|`returns`|
|Aliases|`return`|
|Recommended|true|
|Options|`contexts`|

<!-- assertions requireReturnsType -->
1 change: 1 addition & 0 deletions .README/rules/require-returns.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Will also report if multiple `@returns` tags are present.
| Context | `ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled |
| Tags | `returns` |
| Aliases | `return` |
|Recommended|true|
| Options | `checkConstructors`, `checkGetters`, `contexts`, `exemptedBy`, `forceRequireReturn`, `forceReturnsWithAsync` |
| Settings | `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |

Expand Down
1 change: 1 addition & 0 deletions .README/rules/require-throws.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Requires that throw statements are documented.
| Context | `ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled |
| Tags | `throws` |
| Aliases | `exception` |
|Recommended|true|
| Options | `contexts`, `exemptedBy` |
| Settings | `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |

Expand Down
1 change: 1 addition & 0 deletions .README/rules/valid-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ value). See the setting for more details.
|Tags|For name only unless otherwise stated: `alias`, `augments`, `borrows`, `callback`, `class` (for name and type), `constant` (for name and type), `enum` (for type), `event`, `external`, `fires`, `function`, `implements` (for type), `interface`, `lends`, `listens`, `member` (for name and type), `memberof`, `memberof!`, `mixes`, `mixin`, `modifies`, `module` (for name and type), `name`, `namespace` (for name and type), `param` (for name and type), `property` (for name and type), `returns` (for type), `see` (optionally for name), `this`, `throws` (for type), `type` (for type), `typedef` (for name and type), `yields` (for type)|
|Aliases|`extends`, `constructor`, `const`, `host`, `emits`, `func`, `method`, `var`, `arg`, `argument`, `prop`, `return`, `exception`, `yield`|
|Closure-only|For type only: `package`, `private`, `protected`, `public`, `static`|
|Recommended|true|
|Options|`allowEmptyNamepaths`|
|Settings|`mode`, `structuredTags`|

Expand Down
Loading

0 comments on commit 4e699c4

Please sign in to comment.