Make the exported Options have more descriptions and examples.
I hope that import('prettier-plugin-jsdoc').Options can not only be type-checked, but also provide developers with more specific descriptions and examples.
Just like what is expressed in this picture, in VSCode, you only need to add JSDOC above the variable or property, and then you can get the description and example of that option by hovering over it with your mouse.
Doing so can save developers from having to constantly go back to GitHub to check the documentation. It also makes it easier for developers to configure options that suit their own needs.
Package
App
But I'm not sure if the experience of other IDEs besides VSCode can be consistent.
And if I do this and provide the PR, then I need to set master/tsconfig.json#L8.removeComment configuration to false; I would like to ask for your opinion on this matter.
memo:
-
[ ] jsdocSpaces: number;
-
[ ] jsdocPrintWidth?: number;
-
[ ] jsdocDescriptionWithDot: boolean;
-
[ ] jsdocDescriptionTag: boolean;
-
[ ] jsdocVerticalAlignment: boolean;
-
[ ] jsdocKeepUnParseAbleExampleIndent: boolean;
-
[ ] jsdocSingleLineComment: boolean;
-
[x] jsdocCommentLineStrategy: "singleLine" | "multiline" | "keep";
/* * @example * // jsdocCommentLineStrategy: 'singleLine' * * // input: * * \/** https://github.com/changesets/changesets/blob/main/packages/cli/src/commit/index.ts *\/ * * // output: * * \/** * * https://github.com/changesets/changesets/blob/main/packages/cli/src/commit/index.ts * *\/ * * @example * // jsdocCommentLineStrategy: 'multiline' * * // input: * \/** * * https://github.com/changesets/changesets/blob/main/packages/cli/src/commit/index.ts * *\/ * * // output: * * \/** https://github.com/changesets/changesets/blob/main/packages/cli/src/commit/index.ts *\/ */ jsdocCommentLineStrategy: 'keep', -
[ ] jsdocSeparateReturnsFromParam: boolean;
-
[ ] jsdocSeparateTagGroups: boolean;
-
[ ] jsdocAddDefaultToDescription: boolean;
-
[ ] jsdocCapitalizeDescription: boolean;
-
[ ] jsdocPreferCodeFences: boolean;
-
[ ] tsdoc: boolean;
-
[ ] jsdocLineWrappingStyle: "greedy";
What you said is the mission of JSDoc, and definitely the others IDEs should also go in that direction. LGTM.