gajus / eslint-plugin-jsdoc

JSDoc specific linting rules for ESLint.
Other
1.07k stars 155 forks source link

Manage heading with require-description-complete-sentence #1220

Closed PierBJX closed 1 month ago

PierBJX commented 3 months ago

Expected behavior

I expect to not need to add a dot at the end of a heading in a JS description.

Actual behavior

In our coding rules, it is needed to add a description with some headings (only for class). However, there is a heading which does not contain any sentence but only code sample. Hence, it raises an error because after the heading # Example it expects a dot.

ESLint Config

    "jsdoc/require-description-complete-sentence": [
      "error",
      {
        "abbreviations": [
          "etc",
          "e.g.",
          "i.e."
        ]
      }
    ],

ESLint sample

/**
 * ### Overview
 * My class is doing.
 *
 * ### Example
 * ```javascript
 *  const toto = 'toto';
 * ```
 */
export class ClassExemple {
}

Environment

github-actions[bot] commented 1 month ago

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

The release is available on:

Your semantic-release bot :package::rocket:

PierBJX commented 1 month ago

@brettz9 thanks for the fix but it seems that this fix introduces another issue. Indeed, now it does not raise an error if there is no dot at the end of the sentence below the heading. Here there is no more issue with that

/**
 * ### Overview
 * My class is doing
 */
github-actions[bot] commented 1 month ago

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

The release is available on:

Your semantic-release bot :package::rocket:

brettz9 commented 1 month ago

Sorry about the naive fix... Expect it should be fixed now...

PierBJX commented 1 month ago

Yes perfect ! thanks