Skip to content

Commit cbd2cfb

Browse files
committed
docs: update docs
1 parent 407d3a9 commit cbd2cfb

File tree

6 files changed

+108
-97
lines changed

6 files changed

+108
-97
lines changed

.README/README.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,6 @@ You can then selectively add to or override the recommended rules.
123123
- `settings.jsdoc.ignorePrivate` - Disables all rules for the comment block
124124
on which it occurs.
125125

126-
### Exempting empty functions from `require-jsdoc`
127-
128-
- `settings.jsdoc.exemptEmptyFunctions` - Will not report missing jsdoc blocks
129-
above functions/methods with no parameters or return values (intended where
130-
variable names are sufficient for themselves as documentation).
131-
132126
### Alias Preference
133127

134128
Use `settings.jsdoc.tagNamePreference` to configure a preferred alias name for a JSDoc tag. The format of the configuration is: `<primary tag name>: <preferred alias name>`, e.g.
@@ -321,33 +315,6 @@ how the keys of `preferredTypes` may have `<>` or `.<>` (or just `.`)
321315
appended and its bearing on whether types are checked as parents/children
322316
only (e.g., to match `Array` if the type is `Array` vs. `Array.<string>`).
323317

324-
### Settings to Configure `valid-types`
325-
326-
* `settings.jsdoc.allowEmptyNamepaths` - Set to `false` to disallow
327-
empty name paths with `@callback`, `@event`, `@class`, `@constructor`,
328-
`@constant`, `@const`, `@function`, `@func`, `@method`, `@interface`,
329-
`@member`, `@var`, `@mixin`, `@namespace`, `@listens`, `@fires`,
330-
or `@emits` (these might often be expected to have an accompanying
331-
name path, though they have some indicative value without one; these
332-
may also allow names to be defined in another manner elsewhere in
333-
the block)
334-
* `settings.jsdoc.checkSeesForNamepaths` - Set this to `true` to insist
335-
that `@see` only use name paths (the tag is normally permitted to
336-
allow other text)
337-
338-
### Settings to Configure `require-returns`
339-
340-
* `settings.jsdoc.forceRequireReturn` - Set to `true` to always insist on
341-
`@returns` documentation regardless of implicit or explicit `return`'s
342-
in the function. May be desired to flag that a project is aware of an
343-
`undefined`/`void` return.
344-
345-
### Settings to Configure `require-example`
346-
347-
* `settings.jsdoc.avoidExampleOnConstructors` - Set to `true` to avoid the
348-
need for an example on a constructor (whether indicated as such by a
349-
jsdoc tag or by being within an ES6 `class`).
350-
351318
### Settings to Configure `check-examples`
352319

353320
The settings below all impact the `check-examples` rule and default to

.README/rules/require-example.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ Requires that all functions have examples.
77

88
#### Options
99

10-
Has an object option with one optional property:
10+
This rule has an object option:
1111

1212
- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the document
1313
block avoids the need for an `@example`. Defaults to an empty array.
1414

15+
- `avoidExampleOnConstructors` (default: false) - Set to `true` to avoid the
16+
need for an example on a constructor (whether indicated as such by a
17+
jsdoc tag or by being within an ES6 `class`).
18+
1519
|||
1620
|---|---|
1721
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|

.README/rules/require-jsdoc.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Accepts one optional options object with the following optional keys.
3636
AST contexts where you wish the rule to be applied (e.g., `Property` for
3737
properties). Defaults to an empty array.
3838

39+
- `exemptEmptyFunctions` (default: false) - When `true`, the rule will not report
40+
missing jsdoc blocks above functions/methods with no parameters or return values
41+
(intended where variable names are sufficient for themselves as documentation).
42+
3943
|||
4044
|---|---|
4145
|Context|`ArrowFunctionExpression`, `ClassDeclaration`, `ClassExpression`, `FunctionDeclaration`, `FunctionExpression`|

.README/rules/require-returns.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Requires returns are documented.
66

77
- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the document
88
block avoids the need for a `@returns`. Defaults to an empty array.
9+
- `forceRequireReturn` - Set to `true` to always insist on
10+
`@returns` documentation regardless of implicit or explicit `return`'s
11+
in the function. May be desired to flag that a project is aware of an
12+
`undefined`/`void` return. Defaults to `false`.
913
- `forceReturnsWithAsync` - By default `async` functions that do not explicitly return a value pass this rule. You can force all `async` functions to require return statements by setting `forceReturnsWithAsync` to `true` on the options object. This may be useful as an `async` function will always return a `Promise`, even if the `Promise` returns void. Defaults to `false`.
1014

1115
```js

.README/rules/valid-types.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ Also impacts behaviors on namepath (or event)-defining and pointing tags:
3232
allow `#`, `.`, or `~` at the end (which is not allowed at the end of
3333
normal paths).
3434

35+
#### Options
36+
37+
- `allowEmptyNamepaths` (default: true) - Set to `false` to disallow
38+
empty name paths with `@callback`, `@event`, `@class`, `@constructor`,
39+
`@constant`, `@const`, `@function`, `@func`, `@method`, `@interface`,
40+
`@member`, `@var`, `@mixin`, `@namespace`, `@listens`, `@fires`,
41+
or `@emits` (these might often be expected to have an accompanying
42+
name path, though they have some indicative value without one; these
43+
may also allow names to be defined in another manner elsewhere in
44+
the block)
45+
- `checkSeesForNamepaths` (default: false) - Set this to `true` to insist
46+
that `@see` only use name paths (the tag is normally permitted to
47+
allow other text)
48+
49+
3550
|||
3651
|---|---|
3752
|Context|everywhere|

0 commit comments

Comments
 (0)