@@ -34,6 +34,7 @@ JSDoc linting rules for ESLint.
34
34
* [ ` newline-after-description ` ] ( #eslint-plugin-jsdoc-rules-newline-after-description )
35
35
* [ ` no-types ` ] ( #eslint-plugin-jsdoc-rules-no-types )
36
36
* [ ` no-undefined-types ` ] ( #eslint-plugin-jsdoc-rules-no-undefined-types )
37
+ * [ ` require-asterisk-prefix ` ] ( #eslint-plugin-jsdoc-rules-require-asterisk-prefix )
37
38
* [ ` require-description-complete-sentence ` ] ( #eslint-plugin-jsdoc-rules-require-description-complete-sentence )
38
39
* [ ` require-description ` ] ( #eslint-plugin-jsdoc-rules-require-description )
39
40
* [ ` require-example ` ] ( #eslint-plugin-jsdoc-rules-require-example )
@@ -87,6 +88,7 @@ Finally, enable all of the rules that you would like to use.
87
88
" jsdoc/check-examples" : 1 ,
88
89
" jsdoc/check-indentation" : 1 ,
89
90
" jsdoc/check-param-names" : 1 , // Recommended
91
+ " jsdoc/require-asterisk-prefix" : 1 ,
90
92
" jsdoc/check-syntax" : 1 ,
91
93
" jsdoc/check-tag-names" : 1 , // Recommended
92
94
" jsdoc/check-types" : 1 , // Recommended
@@ -5107,6 +5109,21 @@ function quux () {}
5107
5109
````
5108
5110
5109
5111
5112
+ <a name=" eslint- plugin- jsdoc- rules- require- asterisk- prefix" ></a>
5113
+ ### <code>require-asterisk-prefix</code>
5114
+
5115
+ Requires that each JSDoc line starts with an `*`.
5116
+
5117
+ <a name=" eslint- plugin- jsdoc- rules- require- asterisk- prefix- options- 10 " ></a>
5118
+ #### Options
5119
+
5120
+ This rule allows one optional string argument. If it is `" always" ` then a problem is raised when there is no asterisk prefix on a given jsdoc line. If it is `" never" ` then a problem is raised when there is an asterisk present. The default value is `" always" `.
5121
+
5122
+ |||
5123
+ |---|---|
5124
+ |Context|everywhere|
5125
+ |Tags|N/a|
5126
+
5110
5127
<a name=" eslint- plugin- jsdoc- rules- require- description- complete- sentence" ></a>
5111
5128
### <code>require-description-complete-sentence</code>
5112
5129
@@ -5121,10 +5138,10 @@ tag descriptions are written in complete sentences, i.e.,
5121
5138
* A colon or semi-colon followed by two line breaks is still part of the
5122
5139
containing paragraph (unlike normal dual line breaks).
5123
5140
5124
- <a name=" eslint- plugin- jsdoc- rules- require- description- complete- sentence- options- 10 " ></a>
5141
+ <a name=" eslint- plugin- jsdoc- rules- require- description- complete- sentence- options- 11 " ></a>
5125
5142
#### Options
5126
5143
5127
- <a name=" eslint- plugin- jsdoc- rules- require- description- complete- sentence- options- 10 - tags- 2 " ></a>
5144
+ <a name=" eslint- plugin- jsdoc- rules- require- description- complete- sentence- options- 11 - tags- 2 " ></a>
5128
5145
##### <code>tags</code>
5129
5146
5130
5147
If you want additional tags to be checked for their descriptions, you may
@@ -5612,7 +5629,7 @@ Requires that all functions have a description.
5612
5629
`" tag" `) must have a non-empty description that explains the purpose of the
5613
5630
method.
5614
5631
5615
- <a name=" eslint- plugin- jsdoc- rules- require- description- options- 11 " ></a>
5632
+ <a name=" eslint- plugin- jsdoc- rules- require- description- options- 12 " ></a>
5616
5633
#### Options
5617
5634
5618
5635
An options object may have any of the following properties:
@@ -5897,25 +5914,25 @@ Requires that all functions have examples.
5897
5914
* All functions must have one or more `@example` tags.
5898
5915
* Every example tag must have a non-empty description that explains the method's usage.
5899
5916
5900
- <a name=" eslint- plugin- jsdoc- rules- require- example- options- 12 " ></a>
5917
+ <a name=" eslint- plugin- jsdoc- rules- require- example- options- 13 " ></a>
5901
5918
#### Options
5902
5919
5903
5920
This rule has an object option.
5904
5921
5905
- <a name=" eslint- plugin- jsdoc- rules- require- example- options- 12 - exemptedby" ></a>
5922
+ <a name=" eslint- plugin- jsdoc- rules- require- example- options- 13 - exemptedby" ></a>
5906
5923
##### <code>exemptedBy</code>
5907
5924
5908
5925
Array of tags (e.g., `['type']`) whose presence on the document
5909
5926
block avoids the need for an `@example`. Defaults to an empty array.
5910
5927
5911
- <a name=" eslint- plugin- jsdoc- rules- require- example- options- 12 - avoidexampleonconstructors" ></a>
5928
+ <a name=" eslint- plugin- jsdoc- rules- require- example- options- 13 - avoidexampleonconstructors" ></a>
5912
5929
##### <code>avoidExampleOnConstructors</code>
5913
5930
5914
5931
Set to `true` to avoid the need for an example on a constructor (whether
5915
5932
indicated as such by a jsdoc tag or by being within an ES6 `class`).
5916
5933
Defaults to `false`.
5917
5934
5918
- <a name=" eslint- plugin- jsdoc- rules- require- example- options- 12 - contexts- 1 " ></a>
5935
+ <a name=" eslint- plugin- jsdoc- rules- require- example- options- 13 - contexts- 1 " ></a>
5919
5936
##### <code>contexts</code>
5920
5937
5921
5938
Set this to an array of strings representing the AST context
@@ -6093,7 +6110,7 @@ function quux () {
6093
6110
6094
6111
Requires a hyphen before the `@param` description.
6095
6112
6096
- <a name=" eslint- plugin- jsdoc- rules- require- hyphen- before- param- description- options- 13 " ></a>
6113
+ <a name=" eslint- plugin- jsdoc- rules- require- hyphen- before- param- description- options- 14 " ></a>
6097
6114
#### Options
6098
6115
6099
6116
This rule takes one optional string argument. If it is `" always" ` then a problem is raised when there is no hyphen before the description. If it is `" never" ` then a problem is raised when there is a hyphen before the description. The default value is `" always" `.
@@ -6199,7 +6216,7 @@ function quux () {
6199
6216
Checks for presence of jsdoc comments, on class declarations as well as
6200
6217
functions.
6201
6218
6202
- <a name=" eslint- plugin- jsdoc- rules- require- jsdoc- options- 14 " ></a>
6219
+ <a name=" eslint- plugin- jsdoc- rules- require- jsdoc- options- 15 " ></a>
6203
6220
#### Options
6204
6221
6205
6222
Accepts one optional options object with the following optional keys.
@@ -7387,7 +7404,7 @@ function quux (foo) {
7387
7404
7388
7405
Requires that all function parameters are documented.
7389
7406
7390
- <a name=" eslint- plugin- jsdoc- rules- require- param- options- 15 " ></a>
7407
+ <a name=" eslint- plugin- jsdoc- rules- require- param- options- 16 " ></a>
7391
7408
#### Options
7392
7409
7393
7410
An options object accepts one optional property:
@@ -8487,7 +8504,7 @@ Requires returns are documented.
8487
8504
8488
8505
Will also report if multiple `@returns` tags are present.
8489
8506
8490
- <a name=" eslint- plugin- jsdoc- rules- require- returns- options- 16 " ></a>
8507
+ <a name=" eslint- plugin- jsdoc- rules- require- returns- options- 17 " ></a>
8491
8508
#### Options
8492
8509
8493
8510
- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the document
@@ -8952,7 +8969,7 @@ Also impacts behaviors on namepath (or event)-defining and pointing tags:
8952
8969
allow `#`, `.`, or `~` at the end (which is not allowed at the end of
8953
8970
normal paths).
8954
8971
8955
- <a name=" eslint- plugin- jsdoc- rules- valid- types- options- 17 " ></a>
8972
+ <a name=" eslint- plugin- jsdoc- rules- valid- types- options- 18 " ></a>
8956
8973
#### Options
8957
8974
8958
8975
- `allowEmptyNamepaths` (default: true) - Set to `false` to disallow
0 commit comments