Skip to content

Commit

Permalink
Add JSDoc as dependency to validate documentation
Browse files Browse the repository at this point in the history
DEFRA/water-abstraction-team#125

Using [JSDoc comments](https://jsdoc.app/) to document our code has become our convention.

We add `@module` declarations by default, detail our public methods, including params and returns, and have even added markdown sections in some places.

Recently we went on a deep dive of **JSDoc** to generate documentation from what we've added so far. The good news is that it confirmed that we've got a lot of stuff right! But there are some things we've got wrong, plus some errors that make comments invalid.

This change adds **JSDoc** as a dev-dependency to the project. We can then use it to generate documentation on request. We configure it to error when it encounters documentation it cannot parse, which serves as a means to validate that what we've done is 'error free'.

What we've added may parse without error, but still may not be correct. Being able to generate the documentation will allow us to view how what we've added is presented and makes corrections as and when needed.

We finish this change by correcting the errors and misunderstandings we have now.
  • Loading branch information
Cruikshanks committed Aug 12, 2024
1 parent 8a3f017 commit 322c2f1
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 322c2f1

Please sign in to comment.