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
/** * A foo. */classFoo{/** * Constructs a new foo. * @param {*} value Value. */constructor(value){this.value=value}}
Attempting to use the standard approach will result in documentation not appearing, or the constructor docs take over the class description.
Not only is the documentation.js way unintuitive and a common gotcha, but it causes problems using JSDoc linters that expect a standard approach. This ESLint config will report an error that the constructor is missing JSDoc:
There is no way to configure the ESLint require-jsdoc to ignore constructor. You can't use normal eslint ignore rule directive comments (// eslint-disable-next-line require-jsdoc) as a workaround due to #1090. You're just stuck 😔
The way that documentation.js forces us to document classes is incorrect:
Here is the standard way:
Attempting to use the standard approach will result in documentation not appearing, or the constructor docs take over the class description.
Not only is the documentation.js way unintuitive and a common gotcha, but it causes problems using JSDoc linters that expect a standard approach. This ESLint config will report an error that the constructor is missing JSDoc:
There is no way to configure the ESLint
require-jsdoc
to ignoreconstructor
. You can't use normal eslint ignore rule directive comments (// eslint-disable-next-line require-jsdoc
) as a workaround due to #1090. You're just stuck 😔As part of a fix:
Related:
The text was updated successfully, but these errors were encountered: