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
jsdoc/require-param
produces syntactically invalid code
#771
Comments
🎉 This issue has been resolved in version 35.4.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I changed the behavior to create a normal multiline comment out of a single line comment per your example when missing tags were present. However, I did not change handling for: /** up here
*/ nor: /**
* down here */ ...which will currently add the tags below and above the text, respectively. |
So the rule still produces syntactically invalid code? |
No. It will produce: /** up here
* @param a
* @param b
* @param c
*/ /**
* @param a
* @param b
* @param c
* down here */ I don't want to get too far into policing where people want things. The latter is semantically invalid, but I'm not planning on adding time and complexity to address every possible bad case. The single line comment is a reasonable one to support, and that has been fixed. |
Thank you for the clarification! |
Expected behavior
When given a single-line doc-comment, the rule should add new lines when adding tags.
E.g.
to
Actual behavior
Note: This happens with both ESLint and the VSCode ESLint extension.
ESLint Config
ESLint sample
Example project.
Environment
eslint-plugin-jsdoc
version: 35.4.1The text was updated successfully, but these errors were encountered: