JSDoc support for end-of-line style comments (//…).

JSDoc requires comments beginning with /** and ending with */, but some project coding standards (such as ours) reserve mutli-line comments for debugging purposes and require that all comments begin with // to the end of the line.

This module serves as a plugin for JSDoc to support the end-of-line style of documentation comment. Using this plugin, a JSDoc comment can begin with // followed by any non-whitespace character (optionally preceded by whitespace), and end with the exact same line as was used to start it.

Take care not to include actual multi-line comments (/*…*/) in your comments, but extra // characters in the comment are perfectly fine!


//  The above line starts a JSDoc comment.
//  The following line ends it.
    //*  Note: each terminator is exactly the same as its opener!


npm i -D @aponica/jsdoc-plugin-linecomments

Of course, you must have JSDoc installed, also.


In your JSDoc configuration file, add a plugins section (if there isn't one already) and specify this module as a plugin:

    "plugins": [ "@aponica/jsdoc-plugin-linecomments" ]

That should do it!

Please Donate!

Help keep a roof over our heads and food on our plates! If you find aponica® open source software useful, please click here to make a one-time or recurring donation via PayPal, credit or debit card. Thank you kindly!


Copyright 2020-2021 Opplaud LLC and other contributors.


MIT License.


OPPLAUD and aponica are registered trademarks of Opplaud LLC.

Related Links

Official links for this project:

Related projects: