JSDoc

JSDoc configuration

 * Filename is.
 * Don't forget the tabs.
 * Update  to wherever the autogenerated JavaScript documentation output is. This should be ignored in a  . If you're using the regular CI jobs for generating and publishing the documentation, this must be.
 * Try hard to enable `pedantic`.
 * If you have a JS-specific readme, update the `readme` option.
 * Update  as needed.
 * Output should most probably be available on doc.wikimedia.org since you've taken the trouble to write it.

Example jsdoc.json file

NPM configuration

 * If a separate NPM script is added, the script should be called  to avoid confusion with other languages like PHP. Invocation can be inline though too.
 * Invocation looks like.
 * If you want to include private symbols as well, use
 * Script should be invoked as part of  like.
 * Add the latest JSDoc release (v3.6.11 at time of writing) and jsdoc-wmf-theme (v0.0.8, at time of writing) to `devDependencies`.
 * All jsduck references should be clean (e.g., ).

Code formatting

 * Full details for the JSDoc annotation format are documented on the JSDoc website
 * Typescript and JSDoc have strong overlap, but it is not the same.
 * When using ES6 classes you should not add tags such as: @class, @member, @constructor, @module etc as the structure of your code already expresses this to JSDoc. Adding these tags might cause duplicate definitions
 * JSDoc annotations can be blocks or inline,  is a block tag, and   is an inline tag. A block ends when a new block begins and they have to be separated by newlines
 * Learn how refer to other elements in your code by reading up on namepaths and the @link tag
 * Annotation blocks that precede function or symbol will assume that the annotation belongs to the following code and will use the name of that function or variable.

Externals
When you have references to external code definitions, we do not use the annotation. Instead you should document these by providing a linkmap in the  configuration file, like so:

Publishing on doc.wikimedia.org
In order to add the documentation to https://doc.wikimedia.org take these steps: More details can be found in Continuous integration/Documentation generation.
 * Create a patch for the repo integration/docroot and add a relevant section to the file wikimedia/doc/opensource.yaml (example)
 * Create a patch for the repo integration/config and enable doc generation and upload for the repository containing your jsdoc.json in the file zuul/layout.yaml. (example)