dprint / dprint-plugin-typescript

TypeScript and JavaScript code formatting plugin for dprint.
https://dprint.dev/plugins/typescript
MIT License
258 stars 57 forks source link

Format jsdocs #1

Open dsherret opened 5 years ago

dsherret commented 5 years ago

JSDocs should be formatted.

KnorpelSenf commented 2 years ago

Is anyone working on this already?

aminya commented 2 years ago

There is prettier-plugin-jsdoc. I requested it in https://github.com/dprint/dprint-plugin-prettier/issues/21 In the meantime, it should be possible to configure dprint to use that plugin for formatting tsdoc and jsdoc.

https://www.npmjs.com/package/prettier-plugin-jsdoc https://github.com/hosseinmd/prettier-plugin-jsdoc

KnorpelSenf commented 1 year ago

We already have a plugin to format TS and a plugin to format markdown. We are able to format TS inside markdown.

What needs to be done to format markdown inside TS comments? I'm especially interested in formatting TS inside code examples inside markdown inside TS comments. This basically means that we can recurse mutually between TS and markdown.

What is necessary for this to be implemented? From a naïve standpoint it looks like we just need to stitch a few things together, but I'm sure that it's more complex in reality?