We've just landed a change to ./mach doc so that it no longer needs jsdoc to be globally installed for it to run.
The new mechanism uses the same methods as eslint to install the node module - all you should need to do in future is to run ./mach doc.
If you previously globally installed jsdoc and wish to remove it,
you can do so using:
$ npm uninstall -g jsdoc
Mark.