Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(
validateDescription
): tighten constraint
Currently it is possible to experience a false positive with the `jsdoc/require-description-complete-sentence` rule. The false positive is caused by starting a new line with a capital letter when the previous line does not end with a period. Normally, this is the correct behaviour, however, English sentences are more nuanced than that. The problem arises when using a word that starts with a capital letter that just so happens to be at the start of a line. For instance, `I`, or a programmatic word like `XMLHttpRequest`. This PR tightens the constraint of the `isNewLinePrecededByAPeriod` Function by checking for a lowercase letter immediately after an uppercase letter. This will still produce false positives if the new line starts with `UserInterface` for example.
- Loading branch information
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters