-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Motivation
I prefer using a variation of param type declaration which both JSDoc and TypeScript parse normally. In this variation, the name of the parameter comes first, then its type, and then its description. Here is an example.
/**
@param data {salty} database contents as processed by JSDocs -- See <https://github.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template>.
@param opts {object} the options that were set in a package.json file
@param [tutorials] {RootTutorial} the nested tutorial information as processed by JSDocs
*/
exports.publish = function( data, opts, tutorials ) {
const publisher = new Publisher( opts );
publisher.process( data, tutorials );
};
Current behavior
The rule jsdoc/require-param-type says "Missing JSDoc @param "data" type." (and so forth) even though the type is present, as in the example above.
Desired behavior
The rule should detect the type if it comes after the name.
Alternatives considered
I suppose I could rewrite 10,000+ JSDoc declarations to put the type before the name. For now, I have had to disable this rule.