-
-
Notifications
You must be signed in to change notification settings - Fork 163
Description
To start off, I've really loved this plugin and especially the require-param
rule. This has been great for enforcing consistency of docs on our team!
Our codebase is entirely typescript so we set 'jsdoc/require-param-type': 0,
but leave on jsdoc/require-param
since it will enforce that each function param has an associated comment which is HUGE.
The v25
major upgrade however caused some problems since every object param we had was automatically expanded to have the opts.arg1
, opts.arg2
docs.
We practically never want this expansion to happen because all of these object params have an associated typescript type, and we use tslint completed-docs
to enforce each param in our typescript types has a comment.
My Ask:
Is there a way that we can configured require-param
to never do the automatic expansion of object params? I read the changelog and read the updated docs but I could not for the life of me figure out how to configure the eslint rules so that it never expanded, but still auto fixed to add a jsdoc for the arugment if it was missing. The old setup was so perfect and I 🙏 that there's a way to configure this to keep fix on but to not warn or fix this object expansion
Bonus Points:
Also trying to move off of tslint and finding a full replacement for the completed-docs
rule is really hard. We like to write out types like the following:
/**
* A container definition
*/
export type Container = {
/** Constants */
constants?: ObjByString;
/** Enumerated values, where the values are CONSTANT_CASE by default */
enums?: { [key in string]: TypescriptEnum };
/** Helper functions for that container */
helpers?: { [key in string]: AnyFunction };
};
And the completed-docs
rule can enforce that each of the type params (i.e. constants
, enums
, helpers
has an inline jsdoc). I could see this being outside the scope of this pacakge, but would be incredible if that capability was done here in eslint and not tslint!