Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on a project JSDoc works fine for #148

Closed
l3laze opened this issue Jan 17, 2018 · 3 comments
Closed

Failing on a project JSDoc works fine for #148

l3laze opened this issue Jan 17, 2018 · 3 comments

Comments

@l3laze
Copy link

l3laze commented Jan 17, 2018

Just tried this on a project and it's spitting out the following error

JSDOC_ERROR: ERROR: Unable to parse [redacted]: Unexpected token function

So, it seems that when it runs into an undocumented function it just dies =\

@75lb
Copy link
Member

75lb commented Jan 17, 2018

could you post a reproduction case please.. post some failing source code and the command I should run.

@l3laze
Copy link
Author

l3laze commented Jan 17, 2018

Sorry; the problem seems to be with undocumented code. I was trying to add JSDoc to a project, SteamConfig, last night and after getting the basic JSDoc comments down I started looking at the output and wanted to puke, and tried a couple templates but one was too complicated and another was just completely broken.

So, I decided to try a markdown style of the documentation so I can easily manually change some parts and gave this script a shot. Installed it globally with yarn and ran jsdoc2md index.js from inside the project's directory and it says JSDOC_ERROR: ERROR: Unable to parse /Users/{me}/Projects/SteamConfig/index.js: Unexpected token function.

Which I'm guessing is because of the fact I have some undocumented internal functions in the code, but considering there's no line number for where the error occurred or anything else to go on it could actually be the constructor, which is the first "function" and was documented at the time. I have since given up on JSDoc and just wrote some simple markdown documentation manually, but I just tested again and this issue still happens.

@75lb
Copy link
Member

75lb commented Jan 18, 2018

Fixed and released in v4.0.0 👍

@75lb 75lb closed this as completed Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants