Skip to content

Commit 0a0c7b0

Browse files
committed
Corrected requireHyphenBeforParamDescription description.
1 parent 055861c commit 0a0c7b0

File tree

2 files changed

+9
-100
lines changed

2 files changed

+9
-100
lines changed
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
### `require-description-complete-sentence`
1+
### `require-hyphen-before-param-description`
22

3-
Requires that block description and tag description are written in complete sentences, i.e.,
4-
5-
* Description must start with an uppercase alphabetical character.
6-
* Paragraph must start with an uppercase alphabetical character.
7-
* Sentences must end with a period.
8-
* Every line that starts with a lowercase character must be preceded by a line ending the sentence.
3+
Requires a hyphen before the `@param` description.
94

105
|||
116
|---|---|
127
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
13-
|Tags|`param`, `returns`|
8+
|Tags|`param`|
149

15-
<!-- assertions requireDescriptionCompleteSentence -->
10+
<!-- assertions requireHyphenBeforeParamDescription -->

README.md

Lines changed: 5 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ JSDoc linting rules for ESLint.
1818
* [`check-types`](#eslint-plugin-jsdoc-rules-check-types)
1919
* [`newline-after-description`](#eslint-plugin-jsdoc-rules-newline-after-description)
2020
* [`require-description-complete-sentence`](#eslint-plugin-jsdoc-rules-require-description-complete-sentence)
21-
* [`require-description-complete-sentence`](#eslint-plugin-jsdoc-rules-require-description-complete-sentence)
21+
* [`require-hyphen-before-param-description`](#eslint-plugin-jsdoc-rules-require-hyphen-before-param-description)
2222
* [`require-param`](#eslint-plugin-jsdoc-rules-require-param)
2323
* [`require-param-description`](#eslint-plugin-jsdoc-rules-require-param-description)
2424
* [`require-param-type`](#eslint-plugin-jsdoc-rules-require-param-type)
@@ -639,70 +639,23 @@ function quux () {
639639
```
640640

641641

642-
<h3 id="eslint-plugin-jsdoc-rules-require-description-complete-sentence"><code>require-description-complete-sentence</code></h3>
643-
644-
Requires that block description and tag description are written in complete sentences, i.e.,
642+
<h3 id="eslint-plugin-jsdoc-rules-require-hyphen-before-param-description"><code>require-hyphen-before-param-description</code></h3>
645643

646-
* Description must start with an uppercase alphabetical character.
647-
* Paragraph must start with an uppercase alphabetical character.
648-
* Sentences must end with a period.
649-
* Every line that starts with a lowercase character must be preceded by a line ending the sentence.
644+
Requires a hyphen before the `@param` description.
650645

651646
|||
652647
|---|---|
653648
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
654-
|Tags|`param`, `returns`|
649+
|Tags|`param`|
655650

656651
The following patterns are considered problems:
657652

658653
```js
659654
/**
660-
* foo.
661-
*/
662-
function quux () {
663-
664-
}
665-
666-
/**
667-
* Foo.
668-
*
669-
* foo.
670-
*/
671-
function quux () {
672-
673-
}
674-
675-
/**
676-
* Foo
677-
*/
678-
function quux () {
679-
680-
}
681-
682-
/**
683-
* Foo
684-
* Bar.
655+
* @param foo Foo.
685656
*/
686657
function quux () {
687658

688-
}
689-
690-
/**
691-
* Foo.
692-
*
693-
* @param foo foo.
694-
*/
695-
function quux (foo) {
696-
697-
}
698-
699-
/**
700-
* Foo.
701-
*
702-
* @returns foo.
703-
*/
704-
function quux (foo) {
705-
706659
}
707660
```
708661

@@ -714,45 +667,6 @@ The following patterns are not considered problems:
714667
*/
715668
function quux () {
716669

717-
}
718-
719-
/**
720-
* Foo.
721-
*/
722-
function quux () {
723-
724-
}
725-
726-
/**
727-
* Foo.
728-
* Bar.
729-
*/
730-
function quux () {
731-
732-
}
733-
734-
/**
735-
* Foo.
736-
*
737-
* Bar.
738-
*/
739-
function quux () {
740-
741-
}
742-
743-
/**
744-
* Foo
745-
* bar.
746-
*/
747-
function quux () {
748-
749-
}
750-
751-
/**
752-
* @returns Foo bar.
753-
*/
754-
function quux () {
755-
756670
}
757671
```
758672

0 commit comments

Comments
 (0)