deathraygames / civ-clicker

Fork of the open source game CivClicker, by David Holley and Scott A. Colcord
http://deathraygames.com/play-online/civ-clicker/
GNU General Public License v3.0
56 stars 43 forks source link

Convert documentation to JSDoc #40

Open olleharstedt opened 7 years ago

olleharstedt commented 7 years ago

All functions should be documented using JSDoc conventions.

Lukenickerson commented 7 years ago

Naive question: What's the benefit to using JSDoc?

olleharstedt commented 7 years ago
  1. Using JSDoc conventions, each argument to functions would be document with @param. Return values would use @return. These conventions are used for PHPDoc and Java, too (and maybe other languages), making it easy to read and get an overview. It's especially useful for dynamically typed language, where the type of an argument might not be obvious (depending on naming conventions etc).
  2. JSDoc can generate documentation docs. Not sure if we need that.
Lukenickerson commented 7 years ago

It's google approved (https://google.github.io/styleguide/jsguide.html#jsdoc); I think it's a good idea.