Skip to content

Commit

Permalink
fix(description rules): retrieves desc when present on line with term…
Browse files Browse the repository at this point in the history
…inus; fixes #942
  • Loading branch information
brettz9 committed Jan 16, 2023
1 parent b505f3e commit 4c63c41
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11582,6 +11582,9 @@ function speak() {
export default (foo) => {
foo()
}

/** @file To learn more,
* see: https://github.com/d3/d3-ease. */
````


Expand Down
3 changes: 3 additions & 0 deletions src/iterateJsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ const getUtils = (
}, idx) => {
if (idx && (tag || end)) {
lastDescriptionLine = idx - 1;
if (!tag && description) {
descriptions.push(description);
}

return true;
}
Expand Down
6 changes: 6 additions & 0 deletions test/rules/assertions/requireDescriptionCompleteSentence.js
Original file line number Diff line number Diff line change
Expand Up @@ -1436,5 +1436,11 @@ export default {
sourceType: 'module',
},
},
{
code: `
/** @file To learn more,
* see: https://github.com/d3/d3-ease. */
`,
},
],
};

0 comments on commit 4c63c41

Please sign in to comment.