prettier-plugin-jsdoc icon indicating copy to clipboard operation
prettier-plugin-jsdoc copied to clipboard

enhancement: support @import tag

Open boneskull opened this issue 1 year ago • 1 comments

TS introduces @import in v5.5 beta. 🎉

These tags should be recognized by prettier-plugin-jsdoc and formatted appropriately.

If it's doable, it'd be cool to reformat like so:

/** @import {A} from 'a' */
/** @import {B} from 'b' */
/** @import {B2} from 'b' */
/** @import {B3} from 'b' */

to

/**
 * @import {A} from 'a'
 * @import {
 *   B,
 *   B2,
 *   B3 
 * } from 'b'
 */

boneskull avatar May 21 '24 21:05 boneskull

Thank you, I don't have enough time. But I will try to add it new month.

hosseinmd avatar Jan 03 '25 19:01 hosseinmd

would be great if the formatting could follow the JavaScript way, where there're spaces around the imported identifier, i.e. /** @import { A } from 'a' */ (::

the TypeScript docs show both styles, so it would be up for your interpretation @hosseinmd! though imo, the spaces make it bit more readable.

sxxov avatar Jul 01 '25 03:07 sxxov