Script documentation format for Javascript
See original GitHub issueI am writing my script files in Javascript as opposed to Coffeescript and I keep getting an error with my documentation:
[Fri Nov 13 2015 15:15:54 GMT-0800 (PST)] INFO /home/sankethkatta/hubot/scripts/example.js is using deprecated documentation syntax
I am trying to follow the convention explained in the docs: https://github.com/github/hubot/blob/master/docs/scripting.md#documenting-scripts
I’ve tried replacing the #
with //
as well as a block style:
/**
* <all the docs here>
*/
I still get the same error, no matter how I format it. Is there a preferred way of documenting for Javascript?
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
JavaScript Documentation Standards
The following is a list of what should be documented in WordPress JavaScript files: Functions and class methods. Objects.
Read more >What's the best way to document JavaScript?
How to document your code #. There's a standard approach to JS documentation known as JSDoc. It follows a standard format.
Read more >Code documentation for JavaScript with JSDoc
Writing documentation for the source code can help your future self and your colleagues. Learn how to document JavaScript with JSDoc!
Read more >Documenting JavaScript Code With JSDocs
JavaScript has various data types like strings, numbers, arrays, and objects. The snippets below show how to document each of them using JSDocs....
Read more >The Script element - HTML: HyperText Markup Language
In the example below, the first module specifier ("./shapes/square.js") resolves relative to the base URL of the document, while the second ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looking at the
parseHelp
method in robot.coffee#L505. I found that the//
comment format works:However, it must be the first line of the file or
parseHelp
stops parsing the file. It is important to note that the doc must come before any other code. My issue was that I was using a'use strict';
declaration at the top of the file.So your file should really look like this with any other
require
statements also written after the doc:https://github.com/Romanski1