Skip to content

Auto-fix require-jsdoc adds empty comments #594

@bytroli

Description

@bytroli

Currently having require-jsdoc enabled and running the auto-fixer creates empty comment blocks which are worthless but pass the test for the rule. My suggestion would be to either not add those empty comment blocks or add an enableFixer option so this behaviour can optionally be disabled.

Configuration that triggers the above behaviour on auto-fix:

'jsdoc/require-jsdoc': ['warn', {
    publicOnly: false,
    require: {
        ArrowFunctionExpression: true,
        ClassDeclaration: true,
        ClassExpression: true,
        FunctionDeclaration: true,
        FunctionExpression: true,
        MethodDefinition: true,
    },
    exemptEmptyFunctions: false,
}],

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions