ES2016 arrow support
See original GitHub issueArrows are not supported:
JSDOC_ERROR: ERROR: Unable to parse index.js: Line 67: Unexpected token =>
Steps to reproduce (according to https://github.com/jsdoc2md/jsdoc-to-markdown/wiki/How-to-document-ES2016-features-like-async-&-await):
npm i -g jsdoc-to-markdown@^2.0.0-alpha
npm i jsdoc-babel babel-preset-es2015 babel-plugin-transform-async-to-generator
echo "{
"plugins": ["node_modules/jsdoc-babel"],
"babel": {
"presets": [ "es2015" ],
"plugins": [ "transform-async-to-generator" ]
}
}" > .jsdoc
jsdoc2md --configure .jsdoc src/index.js // echoes nothing, even though 'index.js' is full of es7 code
jsdoc2md --config .jsdoc src/index.js
{
"files": [
".jsdoc",
"src/index.js"
]
}
What am I doing wrong here?
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Arrow function expressions - JavaScript - MDN Web Docs
An arrow function expression is a compact alternative to a traditional function expression, with some semantic differences and deliberate ...
Read more >Arrow Functions in JavaScript: Fat & Concise Syntax - SitePoint
Learn how to use JavaScript arrow functions, understand fat and concise arrow syntax, and what to be aware of when using them in...
Read more >babel/plugin-transform-arrow-functions
Add names to arrow functions. You can read more about configuring plugin options here · ← exponentiation-operatorNext →. Example; Installation; Usage.
Read more >Node.js ES2015/ES6, ES2016 and ES2017 support
Yes. Yes Yes. Yes Error. Error Error. Error Error. Error Error. Error
function() function() function() function() function() function()
function() function() function() function() function() function()
function() function()...
Read more >ECMAScript 6 arrow function that returns an object
You must wrap the returning object literal into parentheses. Otherwise curly braces will be considered to denote the function's body. The following works:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi, i’ve tested this and everything works fine. The reason you are not getting any output is because there are no documented modules or globals in your code. Read this.
sorry, i only just saw the edit you made to your comment above - i am testing on the code you linked to now - thanks