-
-
Notifications
You must be signed in to change notification settings - Fork 163
Fix applied incorrectly for require-jsdoc with MethodDefinition: true #522
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
Comments
Yeah, no doubt this is due to the same core issue, so closing as a dupe of #403. I am too preoccupied with other work to examine this, but someone with a little time should be able to figure this out by looking at https://github.com/syavorsky/comment-parser and our use of it, particularly its stringify methods. (For someone ambitious, it would be nice to address #483 in the same go, as the parsing of comment-parser may also need to be enhanced to preserve more whitespace info--which would then need to be properly stringified.) |
gajus#403, gajus#502, gajus#522 Properly finds base node for affixing jsdoc block and uses to determine appropriate indent (finds base node in a manner sensitive to context, reusing existing and more accurate detection for this purpose, improving detection for function expressions, including arrow function expressions and method definitions). As part of `getReducedASTNode` (used also within `getJSDocComment`), need to stop at `VariableDeclaration` or `ExpressionStatement` (where comments shouldl be checked). Needed for proper function expression documentation placement. Also provides `getJSDocComment` as a named export
Fixed by c1b5b46 (part of https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v24.0.1 ) |
Example code
fix result:
Very similar to #403 but for Method Definitions
The text was updated successfully, but these errors were encountered: