hosseinmd / prettier-plugin-jsdoc

A Prettier plugin to format JSDoc comments.
MIT License
232 stars 28 forks source link

tsdoc - Don't replace @defaultValue with @default #124

Closed aaronadamsCA closed 3 years ago

aaronadamsCA commented 3 years ago

When I format this TypeScript code:

interface DialogProps {
  /**
   * Whether the dialog should disable the main content while open
   *
   * @defaultValue true
   */
  modal?: boolean;
}

This plugin replaces @defaultValue with @default. Per TSDoc docs, the correct tag is @defaultValue.

.prettierrc.cjs:

module.exports = {
  overrides: [
    {
      files: ["*.ts", "*.tsx"],
      options: {
        tsdoc: true,
      },
    },
  ],
};
hosseinmd commented 3 years ago

fixed: https://github.com/hosseinmd/prettier-plugin-jsdoc/commit/6eabd150b1ae100b826bd2d4c2cb84f923bb1cc9 release v 0.3.24