The Linux Page

jsdoc @link not working

Maze of Bugs

The jsdoc tool is much better than doxygen in generating documentation from JavaScript code. Actually doxygen doesn't work at all with ES6 code. At least as of 2018.

So I had to switch to jsdoc. It's annoying that they have no support for the backslash (\), only '@' character. Also there are all sorts of bugs, when this is defined, that doesn't work. If that is not define, then this other thing doesn't work...

For example, I used the @description in that causes problems between the class, the class constructor, and who knows what. So I don't use it at all at this point. Also, the @license has to be defined in the comment of the class, but it will appear in the construtor block.

Now those were not too bad, well... the @description took me a little time to figure out, but the worst so far was the @link. It was working just fine in one of my project and not working at all in another one.

The fact is that in that other one, I had a @module definition, where I put a name which was not the name of the class (i.e. the name of the module was <foo-blah> and the name of the class was <FooBlah>.)

Of course, all I had to do was to remove the @module. I suppose I could have used the correct name too (<FooBlah>) or use the module name to create the links ({@link foo-blah#funct funct()}). Removing that definition made more sense to me. In case I had multiple .js files, each would have a different class, when they would all be part of the same module (so @module would not change, but each class would be different, so it's just not usable at all.)