Fill in missing JSDoc #149

Closed
opened 2025-05-10 22:16:22 -04:00 by rainbownapkin · 8 comments
rainbownapkin commented 2025-05-10 22:16:22 -04:00 (Migrated from gitlab.com)

Code comments are a good start, but we should annotate classes, methods, and functions with JSDoc (https://jsdoc.app/howto-es2015-classes).

A build step should be added in NPM to generate browser-friendly documentation from the JSDoc comments, making them publicly available at the /dev/ endpoint.

Code comments are a good start, but we should annotate classes, methods, and functions with JSDoc (https://jsdoc.app/howto-es2015-classes). A build step should be added in NPM to generate browser-friendly documentation from the JSDoc comments, making them publicly available at the /dev/ endpoint.
rainbownapkin commented 2025-05-10 22:16:22 -04:00 (Migrated from gitlab.com)

added #137 as parent issue

added #137 as parent issue
rainbownapkin commented 2025-05-10 22:18:34 -04:00 (Migrated from gitlab.com)

changed the description

changed the description
rainbownapkin commented 2025-08-25 08:15:26 -04:00 (Migrated from gitlab.com)

Started work on filling in JSDoc, src/app partially documented: fd760e4dab

Started work on filling in JSDoc, src/app partially documented: fd760e4dab486697f0b01db2ce8942533bcbeb3b
rainbownapkin commented 2025-08-25 08:16:44 -04:00 (Migrated from gitlab.com)

changed the description

changed the description
rainbownapkin commented 2025-08-29 02:06:24 -04:00 (Migrated from gitlab.com)

Completed JSDoc for src/app: 2303c89bcf

I will at least document the following:

  • src/utils (7b8c44158f)
  • src/schemas (1d5c1037abd5a53a4c2730b88391fe0ceb44ce62/b78d35d0f8c9c883ba97bb484e00c8722ec43971/ec37c2f59d4af931ca6ea2f3fde713524d1e8fb7/76e2f56eb4dc9f241f315dd5ac14a4864446c892)
  • [~] src/server.js (Not much to document here that isn't already...)
  • www/js/channel (a62be27db773b4cd65286d4ecb11a33d0243fcdd/c0f219276f4c8f43e5879ca3d251ebdf8f98a27f/0e1b48c02ce0ef593607ebe446ece52dfbeac860/1aa836ba481eaefd4e7c0857e97d83c049fc9208/f34ad4829cc55720216753d33fa777a1f9109e20)
  • [~] www/js/utils.js (sans-AJAX code) (Static class members break JSDoc... For now...)

Things like routes, validators, and controllers are probably fine to leave undocumented for now. I'm lazy XP

Completed JSDoc for src/app: 2303c89bcf841bf5ab23acceb8c88b152d9d0555 I will at least document the following: - [X] src/utils (7b8c44158fd06cb07de94f3899037ae0365b43a1) - [X] src/schemas (1d5c1037abd5a53a4c2730b88391fe0ceb44ce62/b78d35d0f8c9c883ba97bb484e00c8722ec43971/ec37c2f59d4af931ca6ea2f3fde713524d1e8fb7/76e2f56eb4dc9f241f315dd5ac14a4864446c892) - [~] src/server.js (Not much to document here that isn't already...) - [X] www/js/channel (a62be27db773b4cd65286d4ecb11a33d0243fcdd/c0f219276f4c8f43e5879ca3d251ebdf8f98a27f/0e1b48c02ce0ef593607ebe446ece52dfbeac860/1aa836ba481eaefd4e7c0857e97d83c049fc9208/f34ad4829cc55720216753d33fa777a1f9109e20) - [~] www/js/utils.js (sans-AJAX code) (Static class members break JSDoc... For now...) Things like routes, validators, and controllers are probably fine to leave undocumented for now. I'm lazy XP
rainbownapkin commented 2025-09-02 07:33:49 -04:00 (Migrated from gitlab.com)

Properly marked exported classes to fix JSDoc (514b00a714)

Properly marked exported classes to fix JSDoc (514b00a714fe0bbf7d611bb866c562df77523402)
rainbownapkin commented 2025-09-02 07:34:26 -04:00 (Migrated from gitlab.com)

We should run through src/app to make sure all exported classes member's are properly documented, because you know they're fucking not.

We should run through src/app to make sure all exported classes member's are properly documented, because you know they're fucking not.
rainbownapkin commented 2025-09-02 07:46:20 -04:00 (Migrated from gitlab.com)

We should also, in the future, consider moving util code to bespoke classes, instead of just functions/variables given to module.exports.

Unfortunately Mongoose Schemas may be stuck in the Global namespace as far as JSDoc is concerned :(

We should also, in the future, consider moving util code to bespoke classes, instead of just functions/variables given to module.exports. Unfortunately Mongoose Schemas may be stuck in the Global namespace as far as JSDoc is concerned :(
rainbownapkin (Migrated from gitlab.com) closed this issue 2025-09-06 00:34:48 -04:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: rainbownapkin/canopy#149
No description provided.