Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
PierBJX opened this issue Mar 29, 2024 · 5 comments · Fixed by #1236, #1237 or femdevs/femdev-website#18 · May be fixed by trojs/deep-merge#16 or trojs/mutator#26
Closed

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

PierBJX opened this issue Mar 29, 2024 · 5 comments · Fixed by #1236, #1237 or femdevs/femdev-website#18 · May be fixed by trojs/deep-merge#16 or trojs/mutator#26

Comments

@PierBJX
Copy link

PierBJX commented Mar 29, 2024

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

  • Node version: v18.18.2
  • ESLint version v8.56.0
  • eslint-plugin-jsdoc version: 46.10.1
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Jun 5, 2024
brettz9 added a commit that referenced this issue Jun 5, 2024
Copy link

github-actions bot commented Jun 5, 2024

🎉 This issue has been resolved in version 48.2.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

@PierBJX
Copy link
Author

PierBJX commented Jun 6, 2024

@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
 */

Copy link

github-actions bot commented Jun 7, 2024

🎉 This issue has been resolved in version 48.2.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

@brettz9
Copy link
Collaborator

brettz9 commented Jun 7, 2024

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

@PierBJX
Copy link
Author

PierBJX commented Jun 8, 2024

Yes perfect ! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment