prettier-plugin-drone-jsdoc

raw JSON →
1.8.0 verified Sat Apr 25 auth: no javascript

A Prettier plugin for formatting JSDoc comments, forked from prettier-plugin-jsdoc. Current stable version is 1.8.0, updated regularly. Key differentiator: removes leading whitespace on the first line of multi-line block comments, aligning with the Drone style guide. Requires Prettier ^3.0.0, supports Node >=14.13.1 or >=16.0.0, and ships TypeScript type declarations.

error Error: Cannot find module 'prettier-plugin-drone-jsdoc'
cause Plugin not installed or not in node_modules.
fix
Install the plugin via npm: 'npm install --save-dev prettier-plugin-drone-jsdoc'
error TypeError: plugin is not a function
cause Incorrectly importing plugin as a function instead of using it in Prettier config.
fix
Add the plugin to the 'plugins' array in .prettierrc instead of calling it directly.
benign Plugin modifies the first line of multi-line block comments, which may not be desired for all projects.
fix Disable the plugin or adjust configuration to preserve original formatting.
npm install prettier-plugin-drone-jsdoc
yarn add prettier-plugin-drone-jsdoc
pnpm add prettier-plugin-drone-jsdoc

Shows minimal Prettier configuration to enable the plugin and customize JSDoc formatting.

// .prettierrc
{
  "plugins": ["prettier-plugin-drone-jsdoc"],
  "jsdocCommentLineStrategy": "singleLine",
  "jsdocSeparateReturnsFromParams": true
}