Skip to content

Commit

Permalink
docs: add meta.docs.description to every rule
Browse files Browse the repository at this point in the history
  • Loading branch information
edg2s committed Jun 17, 2020
1 parent 96408fd commit 0d29a80
Show file tree
Hide file tree
Showing 37 changed files with 109 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/rules/checkAccess.js
Expand Up @@ -35,6 +35,9 @@ export default iterateJsdoc(({
checkPrivate: true,
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Checks that `@access` tags have a valid value.',
},
type: 'suggestion',
},
});
3 changes: 3 additions & 0 deletions src/rules/checkAlignment.js
Expand Up @@ -48,6 +48,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Reports invalid alignment of JSDoc block asterisks.',
},
fixable: 'code',
type: 'layout',
},
Expand Down
3 changes: 3 additions & 0 deletions src/rules/checkExamples.js
Expand Up @@ -289,6 +289,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/checkIndentation.js
Expand Up @@ -40,6 +40,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Reports invalid padding inside JSDoc blocks.',
},
schema: [{
additionalProperties: false,
properties: {
Expand Down
3 changes: 3 additions & 0 deletions src/rules/checkParamNames.js
Expand Up @@ -222,6 +222,9 @@ export default iterateJsdoc(({
);
}, {
meta: {
docs: {
description: 'Ensures that parameter names in JSDoc match those in the function declaration.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/checkPropertyNames.js
Expand Up @@ -100,6 +100,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/checkSyntax.js
Expand Up @@ -17,6 +17,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Reports against Google Closure Compiler syntax.',
},
type: 'suggestion',
},
});
3 changes: 3 additions & 0 deletions src/rules/checkTagNames.js
Expand Up @@ -76,6 +76,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Reports invalid block tag names.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/checkTypes.js
Expand Up @@ -226,6 +226,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Reports invalid types.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/checkValues.js
Expand Up @@ -98,6 +98,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/emptyTags.js
Expand Up @@ -48,6 +48,9 @@ export default iterateJsdoc(({
checkPrivate: true,
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Expects specific tags to be empty of any content.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/implementsOnClasses.js
Expand Up @@ -25,6 +25,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Reports an issue with any non-constructor function using `@implements`.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/matchDescription.js
Expand Up @@ -81,6 +81,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Enforces a regular expression pattern on descriptions.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/newlineAfterDescription.js
Expand Up @@ -55,6 +55,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Enforces a consistent padding of the block description.',
},
fixable: 'whitespace',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/noBadBlocks.js
Expand Up @@ -26,6 +26,9 @@ export default iterateJsdoc(({
}, {
checkFile: true,
meta: {
docs: {
description: 'This rule checks for multi-line-style comments which fail to meet the criteria of a jsdoc block.',
},
fixable: 'code',
type: 'layout',
},
Expand Down
3 changes: 3 additions & 0 deletions src/rules/noDefaults.js
Expand Up @@ -29,6 +29,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'This rule reports defaults being used on the relevant portion of `@param` or `@default`.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/noTypes.js
Expand Up @@ -19,6 +19,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'This rule reports types being used on `@param` or `@returns`.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/noUndefinedTypes.js
Expand Up @@ -153,6 +153,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Checks that types in jsdoc comments are defined.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireDescription.js
Expand Up @@ -70,6 +70,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Requires that all functions have a description.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireDescriptionCompleteSentence.js
Expand Up @@ -201,6 +201,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireExample.js
Expand Up @@ -45,6 +45,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Requires that all functions have examples.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireFileOverview.js
Expand Up @@ -90,6 +90,9 @@ export default iterateJsdoc(({
},
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireHyphenBeforeParamDescription.js
Expand Up @@ -74,6 +74,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Requires a hyphen before the `@param` description.',
},
fixable: 'code',
schema: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/rules/requireJsdoc.js
Expand Up @@ -279,7 +279,7 @@ export default {
);
},
meta: {
doc: {
docs: {
category: 'Stylistic Issues',
description: 'Require JSDoc comments',
recommended: 'true',
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireParam.js
Expand Up @@ -246,6 +246,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Requires that all function parameters are documented.',
},
fixable: 'code',
schema: [
{
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireParamDescription.js
Expand Up @@ -16,6 +16,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Requires that each `@param` tag has a `description` value.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireParamName.js
Expand Up @@ -16,6 +16,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Requires that all function parameters have names.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireParamType.js
Expand Up @@ -16,6 +16,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Requires that each `@param` tag has a `type` value.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireProperty.js
Expand Up @@ -35,6 +35,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.',
},
fixable: 'code',
type: 'suggestion',
},
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requirePropertyDescription.js
Expand Up @@ -16,6 +16,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Requires that each `@property` tag has a `description` value.',
},
type: 'suggestion',
},
});
3 changes: 3 additions & 0 deletions src/rules/requirePropertyName.js
Expand Up @@ -16,6 +16,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Requires that all function `@property` tags have names.',
},
type: 'suggestion',
},
});
3 changes: 3 additions & 0 deletions src/rules/requirePropertyType.js
Expand Up @@ -16,6 +16,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Requires that each `@property` tag has a `type` value.',
},
type: 'suggestion',
},
});
3 changes: 3 additions & 0 deletions src/rules/requireReturns.js
Expand Up @@ -94,6 +94,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Requires returns are documented.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireReturnsCheck.js
Expand Up @@ -63,6 +63,9 @@ export default iterateJsdoc(({
}
}, {
meta: {
docs: {
description: 'Requires a return statement in function body if a `@returns` tag is specified in jsdoc comment.',
},
type: 'suggestion',
},
});
3 changes: 3 additions & 0 deletions src/rules/requireReturnsDescription.js
Expand Up @@ -18,6 +18,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Requires that the `@returns` tag has a `description` value.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/requireReturnsType.js
Expand Up @@ -12,6 +12,9 @@ export default iterateJsdoc(({
}, {
contextDefaults: true,
meta: {
docs: {
description: 'Requires that `@returns` tag has `type` value.',
},
schema: [
{
additionalProperties: false,
Expand Down
3 changes: 3 additions & 0 deletions src/rules/validTypes.js
Expand Up @@ -116,6 +116,9 @@ export default iterateJsdoc(({
}, {
iterateAllJsdocs: true,
meta: {
docs: {
description: 'Requires all types to be valid JSDoc or Closure compiler types without syntax errors.',
},
schema: [
{
additionalProperies: false,
Expand Down

0 comments on commit 0d29a80

Please sign in to comment.