Skip to content

Question about class documentation. #546

@andrei9669

Description

@andrei9669

I'm using Webstorm for development and since 2020 update, there is this new feature that shows JSDoc when hovering over a class/function.
Problem is tho, currently, if I use these rules
{ "rules": { "jsdoc/require-jsdoc": [ "warn", { "require": { "ArrowFunctionExpression": true, "ClassExpression": true, "FunctionExpression": true, "MethodDefinition": true } } ], "jsdoc/require-description": 1, "jsdoc/require-description-complete-sentence": 1 }, "settings": { "jsdoc": { "preferredTypes": { "*": false } } } }
ESLint forces me to add description and params to constructor, but Webstorm doesn't show class params if they are on constructor, but it shows, when they are on class itself.
image
image

Can I somehow configure rules so that it would require to write the class definition and constructor props on top of the class.

Also, one more thing, is it possible to somehow not require jsdoc on top of extended functions, for example in ReactJs lifecycle functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions