Skip to content

Commit

Permalink
docs: add reference to comment
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed May 5, 2021
1 parent 6e835fd commit 74333d4
Show file tree
Hide file tree
Showing 23 changed files with 41 additions and 26 deletions.
2 changes: 2 additions & 0 deletions .README/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ selector).
{"gitdown": "include", "file": "./rules/newline-after-description.md"}
{"gitdown": "include", "file": "./rules/no-bad-blocks.md"}
{"gitdown": "include", "file": "./rules/no-defaults.md"}
{"gitdown": "include", "file": "./rules/no-missing-syntax"}
{"gitdown": "include", "file": "./rules/no-restricted-syntax.md"}
{"gitdown": "include", "file": "./rules/no-types.md"}
{"gitdown": "include", "file": "./rules/no-undefined-types.md"}
{"gitdown": "include", "file": "./rules/require-description-complete-sentence.md"}
Expand Down
4 changes: 2 additions & 2 deletions .README/rules/implements-on-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function is adhering.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied.
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.

Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
Expand Down
5 changes: 3 additions & 2 deletions .README/rules/match-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ checking it by setting it to `false`.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
(e.g., `ClassDeclaration` for ES6
classes). Overrides the default contexts (see below). Set to `"any"` if you
want the rule to apply to any jsdoc block throughout your files.

Expand Down
4 changes: 2 additions & 2 deletions .README/rules/no-defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ the presence of ES6 default parameters (bearing in mind that such

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied.
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions .README/rules/no-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ the type information would be redundant with TypeScript.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied.
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
5 changes: 3 additions & 2 deletions .README/rules/require-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ missing `@example` declarations.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
(e.g., `ClassDeclaration` for ES6
classes). Overrides the default contexts (see below). Set to `"any"` if you
want the rule to apply to any jsdoc block throughout your files.

Expand Down
4 changes: 2 additions & 2 deletions .README/rules/require-param-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Requires that each `@param` tag has a `description` value.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied.
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
4 changes: 2 additions & 2 deletions .README/rules/require-param-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Requires that all function parameters have names.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied.
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
4 changes: 2 additions & 2 deletions .README/rules/require-param-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Requires that each `@param` tag has a `type` value.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied.
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
6 changes: 3 additions & 3 deletions .README/rules/require-param.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ need destructuring.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied. Overrides the default
contexts (see below). May be useful for adding such as
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
Overrides the default contexts (see below). May be useful for adding such as
`TSMethodSignature` in TypeScript or restricting the contexts
which are checked.

Expand Down
4 changes: 2 additions & 2 deletions .README/rules/require-returns-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ or if it is `Promise<void>` or `Promise<undefined>`.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied.
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
4 changes: 2 additions & 2 deletions .README/rules/require-returns-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Requires that `@returns` tag has `type` value.

##### `contexts`

Set this to an array of strings representing the AST context
where you wish the rule to be applied.
Set this to an array of strings representing the AST context (or an object with
`context` and `comment` properties) where you wish the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
3 changes: 2 additions & 1 deletion .README/rules/require-returns.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Will also report if multiple `@returns` tags are present.
object. This may be useful for flagging that there has been consideration
of return type. Defaults to `false`.
- `contexts` - Set this to an array of strings representing the AST context
where you wish the rule to be applied.
(or an object with `context` and `comment` properties) where you wish
the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
3 changes: 2 additions & 1 deletion .README/rules/require-throws.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Requires that throw statements are documented.
so be sure to add back `inheritdoc` if you wish its presence to cause
exemption of the rule.
- `contexts` - Set this to an array of strings representing the AST context
where you wish the rule to be applied.
(or an object with `context` and `comment` properties) where you wish
the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
3 changes: 2 additions & 1 deletion .README/rules/require-yields.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ option to expect a non-standard `@next` tag.
that a project is aware of an `undefined`/`void` yield. Defaults to
`false`.
- `contexts` - Set this to an array of strings representing the AST context
where you wish the rule to be applied.
(or an object with `context` and `comment` properties) where you wish
the rule to be applied.
Overrides the default contexts (see below). Set to `"any"` if you want
the rule to apply to any jsdoc block throughout your files (as is necessary
for finding function blocks not attached to a function declaration or
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import matchDescription from './rules/matchDescription';
import newlineAfterDescription from './rules/newlineAfterDescription';
import noBadBlocks from './rules/noBadBlocks';
import noDefaults from './rules/noDefaults';
import noMissingSyntax from './rules/noMissingSyntax';
import noRestrictedSyntax from './rules/noRestrictedSyntax';
import noTypes from './rules/noTypes';
import noUndefinedTypes from './rules/noUndefinedTypes';
import requireDescription from './rules/requireDescription';
Expand Down Expand Up @@ -62,6 +64,8 @@ export default {
'jsdoc/newline-after-description': 'warn',
'jsdoc/no-bad-blocks': 'off',
'jsdoc/no-defaults': 'off',
'jsdoc/no-missing-syntax': 'off',
'jsdoc/no-restricted-syntax': 'off',
'jsdoc/no-types': 'off',
'jsdoc/no-undefined-types': 'warn',
'jsdoc/require-description': 'off',
Expand Down Expand Up @@ -107,6 +111,8 @@ export default {
'newline-after-description': newlineAfterDescription,
'no-bad-blocks': noBadBlocks,
'no-defaults': noDefaults,
'no-missing-syntax': noMissingSyntax,
'no-restricted-syntax': noRestrictedSyntax,
'no-types': noTypes,
'no-undefined-types': noUndefinedTypes,
'require-description': requireDescription,
Expand Down
Empty file added src/rules/noMissingSyntax.js
Empty file.
Empty file added src/rules/noRestrictedSyntax.js
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions test/rules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const ruleTester = new RuleTester();
'newline-after-description',
'no-bad-blocks',
'no-defaults',
'no-missing-syntax',
'no-restricted-syntax',
'no-types',
'no-undefined-types',
'require-description',
Expand Down

0 comments on commit 74333d4

Please sign in to comment.