You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using /** in a JSDoc @param description for a function causes false errors, that when autofixed, deletes most of the existing JSDoc.
I actually need to be able to write inline code containing this because I'm documenting code to do with authoring JSDoc. It's expected that a multiline comment end (*/) needs to be escaped (*\/) to prevent the JSDoc comment block from closing early, but it is unexpected to have to also escape comment starts (/** -> /\**).
Expected behavior
With this function and the jsdoc/require-param rule enabled:
/** * Description. * @param {string} b Description `/**`. */module.exports=functiona(b){console.info(b);};
There should be no errors.
Actual behavior
There is a jsdoc/require-param error:
Missing JSDoc @param "b" declaration.
It autofixes to this:
/** * `. * @param b */module.exports=functiona(b){console.info(b);};
ESLint Config
{
"rules": {
"jsdoc/require-param": "error"
}
}
ESLint sample
See above reproduction steps.
Environment
Node version: v14.3.0
ESLint version v7.1.0
eslint-plugin-jsdoc version: v27.0.4
The text was updated successfully, but these errors were encountered:
This is an issue in the underlying comment-parser. Please follow at syavorsky/comment-parser#89 . Closing here, as we tend to update fairly frequently (once that may be fixed).
Using
/**
in a JSDoc@param
description for a function causes false errors, that when autofixed, deletes most of the existing JSDoc.I actually need to be able to write inline code containing this because I'm documenting code to do with authoring JSDoc. It's expected that a multiline comment end (
*/
) needs to be escaped (*\/
) to prevent the JSDoc comment block from closing early, but it is unexpected to have to also escape comment starts (/**
->/\**
).Expected behavior
With this function and the
jsdoc/require-param
rule enabled:There should be no errors.
Actual behavior
There is a
jsdoc/require-param
error:It autofixes to this:
ESLint Config
ESLint sample
See above reproduction steps.
Environment
eslint-plugin-jsdoc
version: v27.0.4The text was updated successfully, but these errors were encountered: