Bug 36477

Summary: We should use JSDoc
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: ERMAssignee: Jonathan Druart <jonathan.druart>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, paul.derscheid, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Tomás Cohen Arazi (tcohen) 2024-04-01 17:49:14 UTC
We need to add documentation to our JS codebase. We did some in some of our .js files, but the Vue classes should follow something like this:

https://jsdoc.app/tags-param
Comment 1 Owen Leonard 2024-04-01 19:54:12 UTC
+1
Comment 2 Pedro Amorim 2024-04-02 10:20:40 UTC
Agreed. Adding tests for our JS functions would also be great (looking at you staff-global.js)
Comment 3 Martin Renvoize (ashimema) 2024-04-16 05:56:53 UTC
I thought we already had a coding guideline for this but I'm not seeing it. I completely agree, we should require is and catch missing cases with the QA scripts if we can.
Comment 4 Paul Derscheid 2024-04-16 06:24:00 UTC
+1 to JSDoc and totally agree on qa-script integration. VSCod{e,ium} even generates the base for JSDoc automatically, so it's not really much additional work.
Comment 5 Jonathan Druart 2024-04-16 07:12:03 UTC
Who/Where/When? To add to the dev meeting agenda?
Comment 6 Paul Derscheid 2024-04-16 07:13:41 UTC
Yes, let's add it.