Skip to content

Auto-fix require-jsdoc adds empty comments #594

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

Closed
bytroli opened this issue Jun 25, 2020 · 2 comments
Closed

Auto-fix require-jsdoc adds empty comments #594

bytroli opened this issue Jun 25, 2020 · 2 comments

Comments

@bytroli
Copy link

bytroli commented Jun 25, 2020

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,
}],
@bytroli
Copy link
Author

bytroli commented Jun 25, 2020

Sorry, duplicate of #372. But there has been no resolve on that one. Perhaps it is now possible to add a enableFixer option to the rule similar to the require-* rules.

@brettz9
Copy link
Collaborator

brettz9 commented Jun 28, 2020

Sure, see my comment just now at #372 (comment) . Closing as indeed a dupe of #372.

@brettz9 brettz9 closed this as completed Jun 28, 2020
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

2 participants