-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep prose that applies to the whole block at the block level #156
Comments
But for consistency, it's applying everywhere. |
When I enable * @callback AddVaultType
+ *
* @param {Issuer} collateralIssuer
* @param {Keyword} collateralKeyword
* @param {Rates} rates
+ *
* @returns {Promise<VaultManager>} But it doesn't change the behavior of the description text being moved to the line with the tag. I think what's needed is to treat |
Add option for this case seems good. |
We could do this with two different way,
|
I'm pretty confident that head tags are the only ones you'd want to start from the next line, so I'm good with #1. I'd even suggest the the default be to exclude them from indentation and let users opt into indenting if they want. (Though I don't know why they would want to.) I could be wrong though and there are other cases to consider. In that case #2 gives the most flexibility. But if chosen then I would request that the defaults for the array be If it were me I'd go with #1 and an option |
Description of whole block should be moved to top of block as description and other tags should be below of description. Head tags are in top of tags and below description |
In our codebase, we have a large number of @typedef and @callback. Per JSDoc examples (linked) we keep the prose fully to the left:
For example,
However because we have the prose beneath the tags they qualify, in version 0.3.32 these are reformatting to:
Moving the text to start on the line makes a lot of sense for tags that describe features of the JSDoc block but seems unnecessary for ones that are about the whole block (e.g.
@typedef
and@callback
). Moving it actually makes the text harder to read.As a workaround we could move the prose above the tags, but I think that would still be less readable. In a
@typedef
block the first thing we want to see is what type is being defined. (Not to mention the significant manual effort.)The text was updated successfully, but these errors were encountered: