RubyMine 2020.1 Help

Create JSDoc comments

RubyMine helps you create JSDoc comments and uses them for JavaScript Documentation Lookup with Ctrl+Q. RubyMine recognizes TODO patterns and Closure Compiler annotations inside documentation comments and uses them in code completion, intention actions, and other types of coding assistance.

Find a detailed description of the JSDoc syntax with examples in An Introduction to JSDoc.

Enable JSDoc comments

  1. In the Settings/Preferences dialog Ctrl+Alt+S, go to Editor | General | Smart Keys.

  2. In the Enter area, select the Insert documentation comment stub checkbox.

Create a JSDoc comment

  • Position the caret before the declaration of the method/function or field to document, type the opening block comment /**, and press Enter. Describe the listed parameters, return values, and so on.

  • Alternatively, use the dedicated Fix Doc Comment action. Position the caret at the method/function or field to document, press Ctrl+Shift+A and start typing Fix Doc Comment. Then select Fix Doc Comment from the list, and press Enter.

Last modified: 29 May 2020