hosseinmd / prettier-plugin-jsdoc

A Prettier plugin to format JSDoc comments.
MIT License
228 stars 29 forks source link

unnecessary semicolon for `@example` is added #184

Closed dimaMachina closed 1 year ago

dimaMachina commented 1 year ago

input

  /**
   * @description Set to `true` in order to minify the JSON output.
   * @default false
   *
   * @example
   * ```tsx {10} filename="codegen.ts"
   *  import type { CodegenConfig } from '@graphql-codegen/cli';
   *
   *  const config: CodegenConfig = {
   *    schema: 'https://localhost:4000/graphql',
   *    documents: ['src/**\/*.tsx'],
   *    generates: {
   *      'introspection.json': {
   *        plugins: ['introspection'],
   *        config: {
   *          minify: true
   *        },
   *      },
   *    },
   *  };
   *  export default config;
   * ```
   */

output

  /**
   * Set to `true` in order to minify the JSON output.
   *
   * @example
   *   ```tsx {10} filename="codegen.ts"
   *    import type { CodegenConfig } from '@graphql-codegen/cli';
   *
   *    const config: CodegenConfig = {
   *      schema: 'https://localhost:4000/graphql',
   *      documents: ['src/**\/*.tsx'],
   *      generates: {
   *        'introspection.json': {
   *          plugins: ['introspection'],
   *          config: {
   *            minify: true
   *          },
   *        },
   *      },
   *    };
   *    export default config;
   *   ```;
   *
   * @default false
   */
krzkaczor commented 1 year ago

Did you mean semicolon not comma? (right behind ```)

hosseinmd commented 1 year ago

Don't wrap code with ``` in example

krzkaczor commented 1 year ago

I think this works fine but you need to enable tsdoc (which is where i think you should use fenced blocks)