gajus / eslint-plugin-jsdoc

JSDoc specific linting rules for ESLint.
Other
1.09k stars 157 forks source link

[jsdoc/require-description-complete-sentence] Inline JSDoc tags at the start of a sentence cause lint to fail #1150

Closed jnbooth closed 11 months ago

jnbooth commented 1 year ago

This is similar to #705, but regarding capitalization at the start of a sentence rather than punctuation at the end of it.

Expected behavior

If a JSDoc comment starts with an inline {@link} tag, jsdoc/require-description-complete-sentence should not fail as long as the text starts with a capital letter and ends with a period.

Actual behavior

The above code sample fails jsdoc/require-description-complete-sentence because the linting rule thinks the description starts with {, which is not a capital letter.

ESLint Config

{
  "plugins": ["jsdoc"],
  "rules": {
   "jsdoc/require-description-complete-sentence": ["error"]
  }
}

ESLint sample

/** @param options {@link RequestOptions} specifying path parameters and query parameters. */

Environment

brettz9 commented 11 months ago

I think we should just blanket permit inline tags at the beginning of a sentence. Besides the link possibly being a URL, it may be a variable name or such and not call for capitalization, so I think we should just allow any inline tags at the beginning.

github-actions[bot] commented 11 months ago

:tada: This issue has been resolved in version 46.8.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: