eslint/doctrine

Suggestions for a code analyzer to pair this with?

Closed this issue · 3 comments

heff commented

I'm looking to generate docs that are informed by both the comment tags and the code. Any suggestions on where to start?

dtao commented

This is exactly what autodoc does, if you're interested (major work-in-progress). It uses esprima with the comment option set to include comments along with the AST. It then attempts to associate each comment with a node of the AST, and parses those with doctrine.

There's a lot of potential there, but it's messy in places. I'm still actively working on it. If you're interested in contributing, let me know; otherwise, if you want to tackle the problem your own way, that should give you a decent idea where to start.

heff commented

Cool, I'll check it out. I ended up doing the same actually.
https://github.com/videojs/doc-generator

I got far enough to generate the video.js API docs with relatively few jsdoc tags.
https://github.com/videojs/video.js/blob/v4.4.0/docs/api/vjs.Player.md
...came from...
https://github.com/videojs/video.js/blob/v4.4.0/src/js/player.js
Some of the tags left can actually be removed now, like param tags I think. It's been a few months since I've touched it.

I never got it to work with nested scopes though, at least not without using tags, so it may not be super useful outside of video.js land.

tmcw commented

Cool, good discussion here!

I also maintain a list of documentation generators, and would point to esdoc, typedoc, and documentation.js as major entrants in the 'inference assisted documentation' space.

Closing this issue to keep Issues focused on actionable tasks, but feel free to continue discussing!