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

publicOnly doesn't recognize classes xor methods #648

Closed
apowers313 opened this issue Oct 9, 2020 · 2 comments
Closed

publicOnly doesn't recognize classes xor methods #648

apowers313 opened this issue Oct 9, 2020 · 2 comments

Comments

@apowers313
Copy link

apowers313 commented Oct 9, 2020

Reposted from #288

Expected vs actual behavior

This flavor of exporting a class triggers Missing JSDoc comment on the method but not the class:

class Utility {
    mthd() {
        return false;
    }
}

module.exports = Utility;

This flavor of exporting a class triggers Missing JSDoc comment on the class but not the method:

module.exports = class Utility {
    mthd() {
        return false;
    }
};

ESLint Config

"jsdoc/require-jsdoc": [
    "error", {
        enableFixer: false,
        publicOnly:  true,
        require:     {
            ClassDeclaration:        true,
            ClassExpression:         true,
            FunctionDeclaration:     true,
            FunctionExpression:      true,
            MethodDefinition:        true,
            ArrowFunctionExpression: true,
        },
    },
],

Environment

  • Node version: v14.8.0
  • ESLint version v5.16.0
  • eslint-plugin-jsdoc version: 30.6.3

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@brettz9

This comment has been minimized.

@gajus
Copy link
Owner

gajus commented Apr 11, 2022

🎉 This issue has been resolved in version 39.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Apr 11, 2022
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this issue Apr 13, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | devDependencies | minor | [`39.1.0` -> `39.2.1`](https://renovatebot.com/diffs/npm/eslint-plugin-jsdoc/39.1.0/39.2.1) |

---

### Release Notes

<details>
<summary>gajus/eslint-plugin-jsdoc</summary>

### [`v39.2.1`](https://github.com/gajus/eslint-plugin-jsdoc/releases/v39.2.1)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.2.0...v39.2.1)

##### Bug Fixes

-   regression with checking TS MethodDefinition params ([041de5f](gajus/eslint-plugin-jsdoc@041de5f))

### [`v39.2.0`](https://github.com/gajus/eslint-plugin-jsdoc/releases/v39.2.0)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.1.1...v39.2.0)

##### Features

-   **`require-jsdoc`:** add `minLineCount` option to avoid reporting short functions/contexts; fixes [#&#8203;870](gajus/eslint-plugin-jsdoc#870) ([199aa4a](gajus/eslint-plugin-jsdoc@199aa4a))
-   support inline `minLineCount` ([288363e](gajus/eslint-plugin-jsdoc@288363e))

### [`v39.1.1`](https://github.com/gajus/eslint-plugin-jsdoc/releases/v39.1.1)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.1.0...v39.1.1)

##### Bug Fixes

-   **`require-jsdoc`:** detect ClassDeclaration as referenced public export and ClassExpression methods; fixes [#&#8203;648](gajus/eslint-plugin-jsdoc#648) ([520c7be](gajus/eslint-plugin-jsdoc@520c7be))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1300
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@brettz9 @gajus @apowers313 and others