{"name":"prettier-plugin-jsdoc","version":"1.8.1","description":"A Prettier plugin to format JSDoc comments.","private":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"browser":"dist/index.umd.min.js","unpkg":"dist/index.umd.min.js","types":"dist/index.d.ts","scripts":{"prepare":"yarn build","lint":"eslint --ext '.ts' ./src","test":"yarn build --test && NODE_OPTIONS=\"--loader ts-node/esm\" jest","release":"standard-version && yarn publish && git push --follow-tags origin master","prettierAll":"prettier --write \"**/*.ts\"","clean":"rm -fr dist","build":"chmod +x ./script.sh && ./script.sh"},"keywords":["prettier","plugin","jsdoc","comment"],"author":{"name":"Hossein mohammadi","url":"hosseinm.developer@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/hosseinmd/prettier-plugin-jsdoc/issues"},"homepage":"https://github.com/hosseinmd/prettier-plugin-jsdoc#readme","repository":{"type":"git","url":"git+https://github.com/hosseinmd/prettier-plugin-jsdoc.git"},"devDependencies":{"prettier-plugin-tailwindcss":"^0.7.1","@commitlint/config-conventional":"^14.1.0","@rollup/plugin-commonjs":"^21.0.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@types/jest":"^29.5.4","@types/mdast":"^4.0.1","@typescript-eslint/eslint-plugin":"^6.6.0","@typescript-eslint/parser":"^6.6.0","commitlint":"^14.1.0","eslint":"^8.49.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","husky":"^7.0.4","jest":"^29.6.4","jest-light-runner":"^0.5.0","jest-specific-snapshot":"^5.0.0","prettier":"^3.6.1","rollup":"^2.70.1","standard-version":"^9.3.2","terser":"^5.12.1","ts-node":"^10.9.1","typescript":"^5.2.2"},"peerDependencies":{"prettier":"^3.0.0"},"dependencies":{"binary-searching":"^2.0.5","comment-parser":"^1.4.0","mdast-util-from-markdown":"^2.0.0"},"engines":{"node":">=14.13.1 || >=16.0.0"},"packageManager":"yarn@1.22.22","_id":"prettier-plugin-jsdoc@1.8.1","gitHead":"75825bae4a9e0f74a0539aeeada777d3e54e38d2","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-XuMqBWTc3b/8eCOe+OlZlFy9Z413a7WOmF4i5hDGtjbtIFOdvRrVtGjXR2Feye3TrLWhkkkHheNXPTyYKxw3nA==","shasum":"b16cb3bdbedb4d716c4b31f827769b2bef7c399b","tarball":"http://registry-npm.ywwl.com/prettier-plugin-jsdoc/download/prettier-plugin-jsdoc-1.8.1.tgz","fileCount":30,"unpackedSize":238178,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDCsc/zrwk6sICmb0mFf6VLSkykHmXu2qzjhzv9PqqKiAIgD/4+K/AU38zc3YjZyNdb8xDZqM89MRqtrcWTZNdbCoc="}],"size":62896,"noattachment":false,"key":"/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-1.8.1.tgz"},"_npmUser":{"name":"hosseinmdeveloper","email":"hosseinm.developer@gmail.com"},"directories":{},"maintainers":[{"name":"hosseinmdeveloper","email":"hosseinm.developer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/prettier-plugin-jsdoc_1.8.1_1779959366124_0.8493190987139418"},"_hasShrinkwrap":false,"readme":"[![NPM](https://nodei.co/npm/prettier-plugin-jsdoc.png)](https://nodei.co/npm/prettier-plugin-jsdoc/)\n\n[![Installation size](https://packagephobia.now.sh/badge?p=prettier-plugin-jsdoc)](https://packagephobia.now.sh/result?p=prettier-plugin-jsdoc)\n\n# prettier-plugin-jsdoc\n\nPrettier plugin for formatting comment blocks and converting to a standard.\nMatch with Visual Studio Code and other IDEs that support JSDoc and comments as Markdown.\n\nMany good examples of how this plugin works are in the [`/tests`](/tests) directory.\nCompare tests and their [snapshots](/tests//__snapshots__).\n\nConfigured with best practices of JSDoc style guides.\n\n## Contents\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Ignore](#ignore)\n- [Examples](#examples)\n- [Options](#options)\n- [Supported Prettier versions](#supported-prettier-versions)\n- [Contributing](#contributing)\n- [Links](#links)\n- [Acknowledge](#acknowledge)\n\n## Installation\n\n1. [Install](https://prettier.io/docs/en/install.html) and [configure](https://prettier.io/docs/en/configuration) Prettier\n2. Install `prettier-plugin-jsdoc`:\n\n```sh\nnpm install prettier-plugin-jsdoc --save-dev\n```\n\n```sh\nyarn add prettier-plugin-jsdoc --dev\n```\n\n## Configuration\n\nAdd `prettier-plugin-jsdoc` to your `plugins` list.\n\n**Important:** When using multiple plugins, add `prettier-plugin-jsdoc` to the **end** of the plugins list.\n\n`.prettierrc`:\n\n```json\n{\n  \"plugins\": [\"prettier-plugin-jsdoc\"]\n}\n```\n\nWith other plugins:\n\n```json\n{\n  \"plugins\": [..., \"prettier-plugin-jsdoc\"]\n}\n```\n\n`prettier.config.js`:\n\n```js\nexport default {\n  plugins: [\"prettier-plugin-jsdoc\"],\n};\n```\n\nIf you want to ignore some types of files, use `overrides` with an empty `plugins`:\n\n```json\n{\n  \"plugins\": [\"prettier-plugin-jsdoc\"],\n  \"overrides\": [\n    {\n      \"files\": \"*.tsx\",\n      \"options\": {\n        \"plugins\": []\n      }\n    }\n  ]\n}\n```\n\n## Ignore\n\nTo prevent Prettier from formatting, use `/* */` or `//` instead of /\\*\\* \\*/, or see [Ignoring Code](https://prettier.io/docs/en/ignore#javascript).\n\n## Examples\n\n#### Single line\n\n```js\n/**\n * @param {  string   }    param0 description\n */\nfunction fun(param0) {}\n```\n\nFormats to:\n\n```js\n/** @param {string} param0 Description */\nfunction fun(param0) {}\n```\n\n#### React component\n\n```js\n/**\n * @type {React.FC<{   message:string}   >}\n */\nconst Component = memo(({ message }) => {\n  return <p>{message}</p>;\n});\n```\n\nFormats to:\n\n```js\n/** @type {React.FC<{message: string}>} */\nconst Component = memo(({ message }) => {\n  return <p>{message}</p>;\n});\n```\n\n#### TypeScript objects\n\n```js\n/**\n @typedef {\n    {\n        \"userId\": {\n        \"profileImageLink\": *,\n        \"isBusinessUser\": \"isResellerUser\"|\"isBoolean\"|  \"isSubUser\" |    \"isNot\",\n        \"shareCode\": number,\n        \"referredBy\": any,\n        },\n        id:number\n      }\n     } User\n     */\n```\n\nFormat to:\n\n```js\n/**\n * @typedef {{\n *   userId: {\n *     profileImageLink: any;\n *     isBusinessUser: \"isResellerUser\" | \"isBoolean\" | \"isSubUser\" | \"isNot\";\n *     shareCode: number;\n *     referredBy: any;\n *   };\n *   id: number;\n * }} User\n */\n```\n\n#### Example\n\nAdd code to `@examples` tag.\n\n```js\n/**\n * @examples\n *   var one= 5\n *   var two=10\n *\n *   if(one > 2) { two += one }\n */\n```\n\nFormats to:\n\n```js\n/**\n * @example\n *   var one = 5;\n *   var two = 10;\n *\n *   if (one > 2) {\n *     two += one;\n *   }\n */\n```\n\n#### Description\n\n`@description` is formatted as Markdown so that you can use any features of Markdown on that.\nLike code tags (` ```js `), header tags like `# Header`, or other Markdown features.\n\n## Options\n\n| Key                                 | Type                              | Default      | Description                                                                                                                                                             |\n| :---------------------------------- | :-------------------------------- | :----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `jsdocSpaces`                       | Number                            | 1            |\n| `jsdocDescriptionWithDot`           | Boolean                           | false        |\n| `jsdocDescriptionTag`               | Boolean                           | false        |\n| `jsdocVerticalAlignment`            | Boolean                           | false        |\n| `jsdocKeepUnParseAbleExampleIndent` | Boolean                           | false        |\n| `jsdocCommentLineStrategy`          | (\"singleLine\",\"multiline\",\"keep\") | \"singleLine\" |\n| `jsdocCapitalizeDescription`        | Boolean                           | true         |\n| `jsdocSeparateReturnsFromParam`     | Boolean                           | false        | Adds a space between last `@param` and `@returns`                                                                                                                       |\n| `jsdocSeparateTagGroups`            | Boolean                           | false        | Adds a space between tag groups                                                                                                                                         |\n| `jsdocPreferCodeFences`             | Boolean                           | false        | Always fence code blocks (surround them by triple backticks)                                                                                                            |\n| `jsdocEmptyCommentStrategy`         | (\"remove\",\"keep\")                 | \"remove\"     | How to handle empty JSDoc comment blocks                                                                                                                                |\n| `jsdocBracketSpacing`               | Boolean                           | false        | Whether to add spaces inside JSDoc type brackets. `{string}` (false) vs `{ string }` (true)                                                                             |\n| `tsdoc`                             | Boolean                           | false        | See [TSDoc](#tsdoc)                                                                                                                                                     |\n| `jsdocPrintWidth`                   | Number                            | undefined    | If you don't set the value to `jsdocPrintWidth`, `printWidth` will be used as `jsdocPrintWidth`                                                                         |\n| `jsdocLineWrappingStyle`            | String                            | \"greedy\"     | \"greedy\": lines wrap as soon as they reach `printWidth`. \"balance\": preserve existing line breaks if lines are shorter than `printWidth`, otherwise use greedy wrapping |\n| `jsdocTagsOrder`                    | String (object)                   | undefined    | See [Custom Tags Order](doc/CUSTOM_TAGS_ORDER.md)                                                                                                                       |\n\n### TSDoc\n\nWe hope to support the whole [TSDoc](https://tsdoc.org/).\nIf we missed something, please [create an issue](https://github.com/hosseinmd/prettier-plugin-jsdoc/issues/new).\n\nTo enable, add:\n\n```json\n{\n  \"tsdoc\": true\n}\n```\n\n## Supported Prettier versions\n\n| Plugin version | Prettier version |\n| -------------- | ---------------- |\n| 1.0.0+         | 3.0.0+           |\n| 0.4.2          | 2.x+             |\n\n## Contributing\n\n1. Fork and clone the repository\n2. [Install Yarn](https://yarnpkg.com/getting-started/install)\n3. Install project dependencies:\n\n   ```sh\n   yarn install\n   ```\n\n4. Make changes and make sure that tests pass:\n   ```js\n   yarn run test\n   ```\n5. Update or add tests to your changes if needed\n6. Create PR\n\n## Links\n\n- [Prettier](https://prettier.io)\n- [JSDoc](https://jsdoc.app)\n\n## Acknowledge\n\nThis project extended from the @gum3n worked project on GitLab.\n","publish_time":1779959366307,"_cnpm_publish_time":1779959366307,"dist-tags":{"latest":"1.8.1","next":"0.2.0-rc4"}}